Changeset

8361:6af950b834a6

rostermanager: Log warning if removal self-contact failed
author Kim Alvefur <zash@zash.se>
date Sun, 29 Oct 2017 00:07:45 +0200
parents 8360:3a72378c7479
children 8362:c7d6c2558a24
files core/rostermanager.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/rostermanager.lua	Sun Oct 29 00:07:18 2017 +0200
+++ b/core/rostermanager.lua	Sun Oct 29 00:07:45 2017 +0200
@@ -116,7 +116,9 @@
 	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 });