Software /
code /
prosody
Comparison
core/rostermanager.lua @ 3090:f14d2962f32c
rostermanager: Don't fire roster-load event if there was an error loading the roster
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 22 May 2010 12:20:22 +0100 |
parent | 3087:9b31e36528e0 |
child | 3110:7426727548ed |
comparison
equal
deleted
inserted
replaced
3089:69fb1cb6b551 | 3090:f14d2962f32c |
---|---|
99 if not roster[false] then roster[false] = { }; end | 99 if not roster[false] then roster[false] = { }; end |
100 if roster[jid] then | 100 if roster[jid] then |
101 roster[jid] = nil; | 101 roster[jid] = nil; |
102 log("warn", "roster for "..jid.." has a self-contact"); | 102 log("warn", "roster for "..jid.." has a self-contact"); |
103 end | 103 end |
104 hosts[host].events.fire_event("roster-load", username, host, roster); | 104 if not err then |
105 hosts[host].events.fire_event("roster-load", username, host, roster); | |
106 end | |
105 return roster, err; | 107 return roster, err; |
106 end | 108 end |
107 | 109 |
108 function save_roster(username, host, roster) | 110 function save_roster(username, host, roster) |
109 log("debug", "save_roster: saving roster for "..username.."@"..host); | 111 log("debug", "save_roster: saving roster for "..username.."@"..host); |