Software /
code /
prosody
Comparison
core/rostermanager.lua @ 8357:8b5d846dc664
rostermanager: Remove self-contact entry (fixes #933)
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 19 Sep 2017 19:17:23 +0200 |
parent | 8356:bbd18b617296 |
child | 8358:f36ff1e0ff80 |
comparison
equal
deleted
inserted
replaced
8356:bbd18b617296 | 8357:8b5d846dc664 |
---|---|
113 roster = data or {}; | 113 roster = data or {}; |
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("warn", "roster for %s has a self-contact", jid); | 118 log("warn", "roster for %s had a self-contact, removing", jid); |
119 roster_store:set(username, roster); | |
119 end | 120 end |
120 if not err then | 121 if not err then |
121 hosts[host].events.fire_event("roster-load", { username = username, host = host, roster = roster }); | 122 hosts[host].events.fire_event("roster-load", { username = username, host = host, roster = roster }); |
122 end | 123 end |
123 return roster, err; | 124 return roster, err; |