From b04b0835bc48d7578eb9a679ce5d23e2b4d9e192 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 29 Oct 2017 00:07:45 +0200 Subject: rostermanager: Log warning if removal self-contact failed --- core/rostermanager.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/rostermanager.lua') 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 }); -- cgit v1.2.3