diff options
author | Kim Alvefur <zash@zash.se> | 2015-04-05 16:24:10 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-04-05 16:24:10 +0200 |
commit | 358ced14e0865aa637aaa9e3dc98d6eff47d4148 (patch) | |
tree | 271bb58ce36f5669d39c95e5c74958a715b7969d /core/rostermanager.lua | |
parent | 289dae62f86a64943ace04beb972e13eaab8f50f (diff) | |
parent | 336f7667f8c677c9d1222c993e3f99bff0180772 (diff) | |
download | prosody-358ced14e0865aa637aaa9e3dc98d6eff47d4148.tar.gz prosody-358ced14e0865aa637aaa9e3dc98d6eff47d4148.zip |
Merge 0.10->trunk
Diffstat (limited to 'core/rostermanager.lua')
-rw-r--r-- | core/rostermanager.lua | 11 |
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 |