diff options
author | Waqas Hussain <waqas20@gmail.com> | 2008-12-25 04:58:15 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2008-12-25 04:58:15 +0500 |
commit | f963d6de4a808f498233b4dfa5cb01ebd0e26655 (patch) | |
tree | f877e05a8df1d484811c0c8827d1a3c4079bd293 /core/presencemanager.lua | |
parent | bc031ae346c3f05743c1922ba614a768c0160021 (diff) | |
download | prosody-f963d6de4a808f498233b4dfa5cb01ebd0e26655.tar.gz prosody-f963d6de4a808f498233b4dfa5cb01ebd0e26655.zip |
Directed presence
Diffstat (limited to 'core/presencemanager.lua')
-rw-r--r-- | core/presencemanager.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/presencemanager.lua b/core/presencemanager.lua index e4dd6cc4..4d847563 100644 --- a/core/presencemanager.lua +++ b/core/presencemanager.lua @@ -103,7 +103,14 @@ function handle_normal_presence(origin, stanza, core_route_stanza) 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");
|