[commit-gajim] r11217 - in trunk/src: . common

asterix at gajim.org asterix at gajim.org
Wed Apr 8 18:38:28 CEST 2009


Author: asterix
Date: 2009-04-08 18:38:28 +0200 (Wed, 08 Apr 2009)
New Revision: 11217

Modified:
   trunk/src/common/connection.py
   trunk/src/groupchat_control.py
Log:
don't send NS_MUX <x> element when we change nickname in room


Modified: trunk/src/common/connection.py
===================================================================
--- trunk/src/common/connection.py	2009-04-08 16:28:51 UTC (rev 11216)
+++ trunk/src/common/connection.py	2009-04-08 16:38:28 UTC (rev 11217)
@@ -1661,7 +1661,7 @@
 				resp.getTag('unique').getData()))
 		self.connection.SendAndCallForResponse(iq, _on_response)
 
-	def join_gc(self, nick, room_jid, password):
+	def join_gc(self, nick, room_jid, password, change_nick=False):
 		# FIXME: This room JID needs to be normalized; see #1364
 		if not self.connection:
 			return
@@ -1674,7 +1674,8 @@
 		if gajim.config.get('send_sha_in_gc_presence'):
 			p = self.add_sha(p)
 		self.add_lang(p)
-		t = p.setTag(common.xmpp.NS_MUC + ' x')
+		if not change_nick:
+			t = p.setTag(common.xmpp.NS_MUC + ' x')
 		if password:
 			t.setTagData('password', password)
 		self.connection.send(p)

Modified: trunk/src/groupchat_control.py
===================================================================
--- trunk/src/groupchat_control.py	2009-04-08 16:28:51 UTC (rev 11216)
+++ trunk/src/groupchat_control.py	2009-04-08 16:38:28 UTC (rev 11217)
@@ -1440,7 +1440,8 @@
 					dialogs.ErrorDialog(_('Invalid nickname'),
 					_('The nickname has not allowed characters.'))
 					return True
-				gajim.connections[self.account].join_gc(nick, self.room_jid, None)
+				gajim.connections[self.account].join_gc(nick, self.room_jid, None,
+					change_nick=True)
 				self.new_nick = nick
 				self.clear(self.msg_textview)
 			else:
@@ -1723,7 +1724,8 @@
 				dialogs.ErrorDialog(_('Invalid nickname'),
 				_('The nickname has not allowed characters.'))
 				return
-			gajim.connections[self.account].join_gc(nick, self.room_jid, None)
+			gajim.connections[self.account].join_gc(nick, self.room_jid, None,
+				change_nick=True)
 			if gajim.gc_connected[self.account][self.room_jid]:
 				# We are changing nick, we will change self.nick when we receive
 				# presence that inform that it works



More information about the Commits mailing list