Software /
code /
prosody
Diff
plugins/mod_presence.lua @ 2262:83823ba8de40
Merge with 0.6.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 29 Nov 2009 18:29:19 +0500 |
parent | 2259:22417227d2ce |
child | 2461:a6a50cf0e444 |
line wrap: on
line diff
--- a/plugins/mod_presence.lua Sat Nov 28 18:58:58 2009 +0100 +++ b/plugins/mod_presence.lua Sun Nov 29 18:29:19 2009 +0500 @@ -220,11 +220,11 @@ -- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too) end else - core_route_stanza(origin, st.presence({from=to_bare, to=from_bare, type="unsubscribed"})); + core_route_stanza(hosts[host], st.presence({from=to_bare, to=from_bare, type="unsubscribed"})); end elseif stanza.attr.type == "subscribe" then if rostermanager.is_contact_subscribed(node, host, from_bare) then - core_route_stanza(origin, st.presence({from=to_bare, to=from_bare, type="subscribed"})); -- already subscribed + core_route_stanza(hosts[host], st.presence({from=to_bare, to=from_bare, type="subscribed"})); -- already subscribed -- Sending presence is not clearly stated in the RFC, but it seems appropriate if 0 == send_presence_of_available_resources(node, host, from_bare, origin, core_route_stanza) then -- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too)