# HG changeset patch # User Waqas Hussain # Date 1241739678 -18000 # Node ID 9d9570516ce8ffa1c01543b993d5fcc2bf26a666 # Parent 76bd1bd142347d4c0c6f0ce1c285826c18b6b3d0 mod_muc: commented connection replace detection code because google keeps resendng directed presence diff -r 76bd1bd14234 -r 9d9570516ce8 plugins/mod_muc.lua --- 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