aboutsummaryrefslogtreecommitdiffstats
path: root/core/rostermanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-04-05 16:24:10 +0200
committerKim Alvefur <zash@zash.se>2015-04-05 16:24:10 +0200
commit6566d78b820a402786ae660414d36035b58e9526 (patch)
tree271bb58ce36f5669d39c95e5c74958a715b7969d /core/rostermanager.lua
parent0f75dc0721890e9426fc45938423a2b94d06ba6f (diff)
parent65c3cf814bdc794eddf78d2f7037d1d59ebc995a (diff)
downloadprosody-6566d78b820a402786ae660414d36035b58e9526.tar.gz
prosody-6566d78b820a402786ae660414d36035b58e9526.zip
Merge 0.10->trunk
Diffstat (limited to 'core/rostermanager.lua')
-rw-r--r--core/rostermanager.lua11
1 files changed, 5 insertions, 6 deletions
diff --git a/core/rostermanager.lua b/core/rostermanager.lua
index b39e5323..612a349f 100644
--- a/core/rostermanager.lua
+++ b/core/rostermanager.lua
@@ -86,12 +86,11 @@ local function roster_metadata(roster, err)
metadata = { broken = err or nil };
roster[false] = metadata;
end
- if not metadata.pending then
- if roster.pending and not type(roster.pending.subscription) == "string" then
- metadata.pending, roster.pending = roster.pending, nil;
- else
- metadata.pending = {};
- end
+ if roster.pending and type(roster.pending.subscription) ~= "string" then
+ metadata.pending = roster.pending;
+ roster.pending = nil;
+ elseif not metadata.pending then
+ metadata.pending = {};
end
return metadata;
end