aboutsummaryrefslogtreecommitdiffstats
path: root/core
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
commitefcd11b5412ffae04c6cab377c1a5a757ca1acb9 (patch)
tree9513cb6b03f24d068a8951f0a1e41b5464c9ea85 /core
parent04bdf078d399e9b0578b9f13f22fab2e8f96fd50 (diff)
downloadprosody-efcd11b5412ffae04c6cab377c1a5a757ca1acb9.tar.gz
prosody-efcd11b5412ffae04c6cab377c1a5a757ca1acb9.zip
rostermanager: Log warning if removal self-contact failed
Diffstat (limited to 'core')
-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 });