Software /
code /
prosody
Diff
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 |
line wrap: on
line diff
--- a/core/stanza_router.lua Thu Dec 25 04:27:19 2008 +0500 +++ b/core/stanza_router.lua Thu Dec 25 04:58:15 2008 +0500 @@ -110,6 +110,10 @@ elseif origin.type ~= "c2s" and stanza.name == "iq" and not resource then -- directed at bare JID core_handle_stanza(origin, stanza); else + 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 + origin.directed = origin.directed or {}; + t_insert(origin.directed, to); -- FIXME does it make more sense to add to_bare rather than to? + end core_route_stanza(origin, stanza); end else