Changeset

1141:9d9570516ce8

mod_muc: commented connection replace detection code because google keeps resendng directed presence
author Waqas Hussain <waqas20@gmail.com>
date Fri, 08 May 2009 04:41:18 +0500
parents 1140:76bd1bd14234
children 1142:0e02b3301e80
files plugins/mod_muc.lua
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_muc.lua	Fri May 08 01:29:43 2009 +0500
+++ b/plugins/mod_muc.lua	Fri May 08 04:41:18 2009 +0500
@@ -260,7 +260,7 @@
 			end
 		elseif not type then -- available
 			if current_nick then
-				if #pr == #stanza or current_nick ~= to then
+				--if #pr == #stanza or current_nick ~= to then -- commented because google keeps resending directed presence
 					if current_nick == to then -- simple presence
 						log("debug", "%s broadcasted presence", current_nick);
 						rooms:get(room, current_nick).sessions[from] = pr;
@@ -287,11 +287,11 @@
 							end
 						end
 					end
-				else -- possible rejoin
-					log("debug", "%s had connection replaced", current_nick);
-					handle_to_occupant(origin, st.presence({type='unavailable', from=from, to=to}):tag('status'):text('Replaced by new connection'):up()); -- send unavailable
-					handle_to_occupant(origin, stanza); -- resend available
-				end
+				--else -- possible rejoin
+				--	log("debug", "%s had connection replaced", current_nick);
+				--	handle_to_occupant(origin, st.presence({type='unavailable', from=from, to=to}):tag('status'):text('Replaced by new connection'):up()); -- send unavailable
+				--	handle_to_occupant(origin, stanza); -- resend available
+				--end
 			else -- enter room
 				local new_nick = to;
 				if rooms:get(room, to) then