aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-02-15 04:15:37 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-02-15 04:15:37 +0500
commita58fef84ce59a61a89da28dfcc342e9887ed183b (patch)
tree1bfce66d5a97b36cb0edbe06ea84e5c9ff910f7d
parent93d80250eb99d5fac82a09405557844ed3fea2df (diff)
downloadprosody-a58fef84ce59a61a89da28dfcc342e9887ed183b.tar.gz
prosody-a58fef84ce59a61a89da28dfcc342e9887ed183b.zip
mod_presence: Reflect the user's own presence back to them.
-rw-r--r--plugins/mod_presence.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index f6ea9e6b..a39d9c19 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -63,6 +63,9 @@ local function recalc_resource_map(user)
end
function handle_normal_presence(origin, stanza, core_route_stanza)
+ if full_sessions[origin.full_jid] then -- if user is still connected
+ origin.send(stanza); -- reflect their presence back to them
+ end
local roster = origin.roster;
local node, host = origin.username, origin.host;
local user = bare_sessions[node.."@"..host];