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
commit15b32576a96cdc8b594e8c4f5b11680c3c697ea2 (patch)
tree95070615277d0a252ae27230d4b27cf8d9902062
parent4d3d1789cc57c1c0b9ce8d199a95a9a412f9d723 (diff)
downloadprosody-15b32576a96cdc8b594e8c4f5b11680c3c697ea2.tar.gz
prosody-15b32576a96cdc8b594e8c4f5b11680c3c697ea2.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];