Diff

plugins/mod_presence.lua @ 6613:2aae36312eb9

rostermanager, mod_roster, mod_presence: Move pending roster items to roster metadata field
author Kim Alvefur <zash@zash.se>
date Fri, 03 Apr 2015 06:38:22 +0200
parent 6302:76699a0ae4c4
child 7265:78be11bf62bf
line wrap: on
line diff
--- a/plugins/mod_presence.lua	Thu Apr 02 14:31:41 2015 +0200
+++ b/plugins/mod_presence.lua	Fri Apr 03 06:38:22 2015 +0200
@@ -106,10 +106,8 @@
 				res.presence.attr.to = nil;
 			end
 		end
-		if roster.pending then -- resend incoming subscription requests
-			for jid in pairs(roster.pending) do
-				origin.send(st.presence({type="subscribe", from=jid})); -- TODO add to attribute? Use original?
-			end
+		for jid in pairs(roster[false].pending) do -- resend incoming subscription requests
+			origin.send(st.presence({type="subscribe", from=jid})); -- TODO add to attribute? Use original?
 		end
 		local request = st.presence({type="subscribe", from=origin.username.."@"..origin.host});
 		for jid, item in pairs(roster) do -- resend outgoing subscription requests