Comparison

core/rostermanager.lua @ 8361:6af950b834a6

rostermanager: Log warning if removal self-contact failed
author Kim Alvefur <zash@zash.se>
date Sun, 29 Oct 2017 00:07:45 +0200
parent 8360:3a72378c7479
child 8496:9b81c22d5b54
comparison
equal deleted inserted replaced
8360:3a72378c7479 8361:6af950b834a6
114 if user then user.roster = roster; end 114 if user then user.roster = roster; end
115 roster_metadata(roster, err); 115 roster_metadata(roster, err);
116 if roster[jid] then 116 if roster[jid] then
117 roster[jid] = nil; 117 roster[jid] = nil;
118 log("debug", "Roster for %s had a self-contact, removing", jid); 118 log("debug", "Roster for %s had a self-contact, removing", jid);
119 save_roster(username, host, roster, jid); 119 if not save_roster(username, host, roster, jid) then
120 log("warn", "Could not remove self-contact from roster for %s", jid);
121 end
120 end 122 end
121 if not err then 123 if not err then
122 hosts[host].events.fire_event("roster-load", { username = username, host = host, roster = roster }); 124 hosts[host].events.fire_event("roster-load", { username = username, host = host, roster = roster });
123 end 125 end
124 return roster, err; 126 return roster, err;