diff options
author | Kim Alvefur <zash@zash.se> | 2017-12-29 20:50:07 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-12-29 20:50:07 +0100 |
commit | 7026ec90060954062365b75c9974eb8045d9f548 (patch) | |
tree | f99617f5697506024e44291a1efd56e81a69f031 /core | |
parent | e6ada2cc8cac45d403590bb499c65a8b817f3658 (diff) | |
parent | 76d18a84640f7083f658776d66a7833f067e0377 (diff) | |
download | prosody-7026ec90060954062365b75c9974eb8045d9f548.tar.gz prosody-7026ec90060954062365b75c9974eb8045d9f548.zip |
Merge 0.10->trunk
Diffstat (limited to 'core')
-rw-r--r-- | core/rostermanager.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/rostermanager.lua b/core/rostermanager.lua index f6a44028..65be0de0 100644 --- a/core/rostermanager.lua +++ b/core/rostermanager.lua @@ -112,7 +112,15 @@ local function load_roster(username, host) local data, err = roster_store:get(username); roster = data or {}; if user then user.roster = roster; end + local legacy_pending = roster.pending and type(roster.pending.subscription) ~= "string"; roster_metadata(roster, err); + if legacy_pending then + -- Due to map store use, we need to manually delete this entry + log("debug", "Removing legacy 'pending' entry"); + if not save_roster(username, host, roster, "pending") then + log("warn", "Could not remove legacy 'pendig' entry"); + end + end if roster[jid] then roster[jid] = nil; log("debug", "Roster for %s had a self-contact, removing", jid); |