Software /
code /
prosody
Comparison
core/stanza_router.lua @ 641:658a2de74afc
Directed presence
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 25 Dec 2008 04:58:15 +0500 |
parent | 640:068130563311 |
child | 642:0ae8584ba3e7 |
comparison
equal
deleted
inserted
replaced
640:068130563311 | 641:658a2de74afc |
---|---|
108 elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then | 108 elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then |
109 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza); | 109 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza); |
110 elseif origin.type ~= "c2s" and stanza.name == "iq" and not resource then -- directed at bare JID | 110 elseif origin.type ~= "c2s" and stanza.name == "iq" and not resource then -- directed at bare JID |
111 core_handle_stanza(origin, stanza); | 111 core_handle_stanza(origin, stanza); |
112 else | 112 else |
113 if origin.type == "c2s" and stanza.name == "presence" and to ~= nil and not(origin.roster[to_bare] and (origin.roster[to_bare].subscription == "both" or origin.roster[to_bare].subscription == "from")) then | |
114 origin.directed = origin.directed or {}; | |
115 t_insert(origin.directed, to); -- FIXME does it make more sense to add to_bare rather than to? | |
116 end | |
113 core_route_stanza(origin, stanza); | 117 core_route_stanza(origin, stanza); |
114 end | 118 end |
115 else | 119 else |
116 core_handle_stanza(origin, stanza); | 120 core_handle_stanza(origin, stanza); |
117 end | 121 end |