Comparison

core/rostermanager.lua @ 6624:7f9b49f2758a

rostermanager: Fix roster upgrade code (thanks mva)
author Kim Alvefur <zash@zash.se>
date Sun, 05 Apr 2015 16:19:02 +0200
parent 6622:fb60cee2144e
child 6662:5ef319efedba
comparison
equal deleted inserted replaced
6622:fb60cee2144e 6624:7f9b49f2758a
84 local metadata = roster[false]; 84 local metadata = roster[false];
85 if not metadata then 85 if not metadata then
86 metadata = { broken = err or nil }; 86 metadata = { broken = err or nil };
87 roster[false] = metadata; 87 roster[false] = metadata;
88 end 88 end
89 if not metadata.pending then 89 if roster.pending and type(roster.pending.subscription) ~= "string" then
90 if roster.pending and not type(roster.pending.subscription) == "string" then 90 metadata.pending = roster.pending;
91 metadata.pending, roster.pending = roster.pending, nil; 91 roster.pending = nil;
92 else 92 elseif not metadata.pending then
93 metadata.pending = {}; 93 metadata.pending = {};
94 end
95 end 94 end
96 return metadata; 95 return metadata;
97 end 96 end
98 97
99 function load_roster(username, host) 98 function load_roster(username, host)