Comparison

plugins/mod_presence.lua @ 1488:0d1aff918303

mod_presence: Fixed: Presence probe replies now get sent to the full JID of the probe sender
author Waqas Hussain <waqas20@gmail.com>
date Mon, 06 Jul 2009 01:37:57 +0500
parent 1480:93d3295fb064
child 1508:762d758e116a
comparison
equal deleted inserted replaced
1480:93d3295fb064 1488:0d1aff918303
207 local st_from, st_to = stanza.attr.from, stanza.attr.to; 207 local st_from, st_to = stanza.attr.from, stanza.attr.to;
208 stanza.attr.from, stanza.attr.to = from_bare, to_bare; 208 stanza.attr.from, stanza.attr.to = from_bare, to_bare;
209 log("debug", "inbound presence "..stanza.attr.type.." from "..from_bare.." for "..to_bare); 209 log("debug", "inbound presence "..stanza.attr.type.." from "..from_bare.." for "..to_bare);
210 if stanza.attr.type == "probe" then 210 if stanza.attr.type == "probe" then
211 if rostermanager.is_contact_subscribed(node, host, from_bare) then 211 if rostermanager.is_contact_subscribed(node, host, from_bare) then
212 if 0 == send_presence_of_available_resources(node, host, from_bare, origin, core_route_stanza) then 212 if 0 == send_presence_of_available_resources(node, host, st_from, origin, core_route_stanza) then
213 -- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too) 213 -- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too)
214 end 214 end
215 else 215 else
216 core_route_stanza(origin, st.presence({from=to_bare, to=from_bare, type="unsubscribed"})); 216 core_route_stanza(origin, st.presence({from=to_bare, to=from_bare, type="unsubscribed"}));
217 end 217 end