Software /
code /
prosody
Comparison
plugins/mod_presence.lua @ 2844:0e4f6df8b2a3
mod_presence: Quick fix to make probes from local users to local hosts work.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 29 Jan 2010 21:08:18 +0500 |
parent | 2843:621f71d7ba2b |
child | 2592:3af266f7037f |
comparison
equal
deleted
inserted
replaced
2843:621f71d7ba2b | 2844:0e4f6df8b2a3 |
---|---|
74 stanza.attr.to = jid; | 74 stanza.attr.to = jid; |
75 core_route_stanza(origin, stanza); | 75 core_route_stanza(origin, stanza); |
76 end | 76 end |
77 end | 77 end |
78 if stanza.attr.type == nil and not origin.presence then -- initial presence | 78 if stanza.attr.type == nil and not origin.presence then -- initial presence |
79 origin.presence = stanza; -- FIXME repeated later | |
79 local probe = st.presence({from = origin.full_jid, type = "probe"}); | 80 local probe = st.presence({from = origin.full_jid, type = "probe"}); |
80 for jid, item in pairs(roster) do -- probe all contacts we are subscribed to | 81 for jid, item in pairs(roster) do -- probe all contacts we are subscribed to |
81 if item.subscription == "both" or item.subscription == "to" then | 82 if item.subscription == "both" or item.subscription == "to" then |
82 probe.attr.to = jid; | 83 probe.attr.to = jid; |
83 core_route_stanza(origin, probe); | 84 core_route_stanza(origin, probe); |