mod_muc: commented connection replace detection code because google keeps resendng directed presence

Fri, 08 May 2009 04:41:18 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 08 May 2009 04:41:18 +0500
changeset 1141
9d9570516ce8
parent 1140
76bd1bd14234
child 1142
0e02b3301e80

mod_muc: commented connection replace detection code because google keeps resendng directed presence

plugins/mod_muc.lua file | annotate | diff | comparison | revisions
--- 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

mercurial