aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-10-29 00:07:45 +0200
committerKim Alvefur <zash@zash.se>2017-10-29 00:07:45 +0200
commit619bd5e6f1db1ecb45de99b310781f997a39d20c (patch)
tree213f4769326b1bd896109e4912379b602d3b3950
parentfe0803caebaf06e4a43d880bdc2732ddc7eb30b6 (diff)
downloadprosody-im-server-619bd5e6f1db1ecb45de99b310781f997a39d20c.zip
prosody-im-server-619bd5e6f1db1ecb45de99b310781f997a39d20c.tar
rostermanager: Log warning if removal self-contact failed
-rw-r--r--core/rostermanager.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/rostermanager.lua b/core/rostermanager.lua
index dda69e7c..f6a44028 100644
--- a/core/rostermanager.lua
+++ b/core/rostermanager.lua
@@ -116,7 +116,9 @@ local function load_roster(username, host)
if roster[jid] then
roster[jid] = nil;
log("debug", "Roster for %s had a self-contact, removing", jid);
- save_roster(username, host, roster, jid);
+ if not save_roster(username, host, roster, jid) then
+ log("warn", "Could not remove self-contact from roster for %s", jid);
+ end
end
if not err then
hosts[host].events.fire_event("roster-load", { username = username, host = host, roster = roster });