Software /
code /
prosody
Diff
core/presencemanager.lua @ 641:658a2de74afc
Directed presence
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 25 Dec 2008 04:58:15 +0500 |
parent | 615:4ae3e81513f3 |
child | 649:5f8382768530 |
line wrap: on
line diff
--- a/core/presencemanager.lua Thu Dec 25 04:27:19 2008 +0500 +++ b/core/presencemanager.lua Thu Dec 25 04:58:15 2008 +0500 @@ -103,7 +103,14 @@ end origin.priority = 0; if stanza.attr.type == "unavailable" then - origin.presence = nil; + origin.presence = nil; + if origin.directed then + for _, jid in ipairs(origin.directed) do + stanza.attr.to = jid; + core_route_stanza(origin, stanza); + end + origin.directed = nil; + end else origin.presence = stanza; local priority = stanza:child_with_name("priority");