Diff

plugins/mod_roster.lua @ 7334:566d0a56b37f

mod_roster: Fire event for pending items for good measure
author Kim Alvefur <zash@zash.se>
date Mon, 04 Apr 2016 21:48:42 +0200
parent 7333:9d0e65d919e8
child 7781:0d31d8052dd8
line wrap: on
line diff
--- a/plugins/mod_roster.lua	Mon Apr 04 17:18:27 2016 +0200
+++ b/plugins/mod_roster.lua	Mon Apr 04 21:48:42 2016 +0200
@@ -143,6 +143,12 @@
 			module:fire_event("roster-item-removed", {
 				username = username, jid = jid, item = item, roster = roster, origin = origin,
 			});
+		else
+			for jid in pairs(item.pending) do
+				module:fire_event("roster-item-removed", {
+					username = username, jid = jid, roster = roster, origin = origin,
+				});
+			end
 		end
 	end
 end, 300);