Software /
code /
prosody
Comparison
core/rostermanager.lua @ 8360:3a72378c7479
rostermanager: Use internal method for storing removal of self-contact
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 29 Oct 2017 00:07:18 +0200 |
parent | 8359:467ca83e6c0e |
child | 8361:6af950b834a6 |
comparison
equal
deleted
inserted
replaced
8359:467ca83e6c0e | 8360:3a72378c7479 |
---|---|
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 roster_store:set(username, roster); | 119 save_roster(username, host, roster, jid); |
120 end | 120 end |
121 if not err then | 121 if not err then |
122 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 }); |
123 end | 123 end |
124 return roster, err; | 124 return roster, err; |