Changeset

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
parents 7333:9d0e65d919e8
children 7335:ab7e7d4fe9c1 7336:0d9ac472e58c
files plugins/mod_roster.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
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);