don't send NS_MUX <x> element when we change nickname in room
This commit is contained in:
parent
0c27b86cc1
commit
dc69e49db6
|
@ -1661,7 +1661,7 @@ class Connection(ConnectionHandlers):
|
|||
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 @@ class Connection(ConnectionHandlers):
|
|||
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)
|
||||
|
|
|
@ -1440,7 +1440,8 @@ class GroupchatControl(ChatControlBase):
|
|||
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 @@ class GroupchatControl(ChatControlBase):
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue