Diff

plugins/mod_presence.lua @ 2863:b5924a017849

mod_presence: Reflect the user's own presence back to them.
author Waqas Hussain <waqas20@gmail.com>
date Mon, 15 Feb 2010 04:15:37 +0500
parent 2852:56630a6c9a31
child 2644:c75c22c316d6
child 2923:b7049746bd29
line wrap: on
line diff
--- a/plugins/mod_presence.lua	Sun Feb 14 20:37:49 2010 +0000
+++ b/plugins/mod_presence.lua	Mon Feb 15 04:15:37 2010 +0500
@@ -63,6 +63,9 @@
 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];