Diff

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
line wrap: on
line diff
--- a/core/rostermanager.lua	Sat May 22 05:53:27 2010 +0500
+++ b/core/rostermanager.lua	Sat May 22 12:20:22 2010 +0100
@@ -101,7 +101,9 @@
 		roster[jid] = nil;
 		log("warn", "roster for "..jid.." has a self-contact");
 	end
-	hosts[host].events.fire_event("roster-load", username, host, roster);
+	if not err then
+		hosts[host].events.fire_event("roster-load", username, host, roster);
+	end
 	return roster, err;
 end