Comparison

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
comparison
equal deleted inserted replaced
6612:6cc48b51d699 6613:2aae36312eb9
104 res.presence.attr.to = origin.full_jid; 104 res.presence.attr.to = origin.full_jid;
105 core_post_stanza(res, res.presence, true); 105 core_post_stanza(res, res.presence, true);
106 res.presence.attr.to = nil; 106 res.presence.attr.to = nil;
107 end 107 end
108 end 108 end
109 if roster.pending then -- resend incoming subscription requests 109 for jid in pairs(roster[false].pending) do -- resend incoming subscription requests
110 for jid in pairs(roster.pending) do 110 origin.send(st.presence({type="subscribe", from=jid})); -- TODO add to attribute? Use original?
111 origin.send(st.presence({type="subscribe", from=jid})); -- TODO add to attribute? Use original?
112 end
113 end 111 end
114 local request = st.presence({type="subscribe", from=origin.username.."@"..origin.host}); 112 local request = st.presence({type="subscribe", from=origin.username.."@"..origin.host});
115 for jid, item in pairs(roster) do -- resend outgoing subscription requests 113 for jid, item in pairs(roster) do -- resend outgoing subscription requests
116 if item.ask then 114 if item.ask then
117 request.attr.to = jid; 115 request.attr.to = jid;