Software /
code /
prosody
Changeset
8497:b703f56b8194
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 29 Dec 2017 20:50:07 +0100 |
parents | 8495:c494e12ce81f (current diff) 8496:9b81c22d5b54 (diff) |
children | 8498:85f60424a8b1 |
files | |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core/rostermanager.lua Thu Dec 28 22:21:32 2017 +0100 +++ b/core/rostermanager.lua Fri Dec 29 20:50:07 2017 +0100 @@ -112,7 +112,15 @@ 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);