don't send NS_MUX <x> element when we change nickname in room
This commit is contained in:
parent
0c27b86cc1
commit
dc69e49db6
2 changed files with 7 additions and 4 deletions
|
@ -1661,7 +1661,7 @@ class Connection(ConnectionHandlers):
|
||||||
resp.getTag('unique').getData()))
|
resp.getTag('unique').getData()))
|
||||||
self.connection.SendAndCallForResponse(iq, _on_response)
|
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
|
# FIXME: This room JID needs to be normalized; see #1364
|
||||||
if not self.connection:
|
if not self.connection:
|
||||||
return
|
return
|
||||||
|
@ -1674,6 +1674,7 @@ class Connection(ConnectionHandlers):
|
||||||
if gajim.config.get('send_sha_in_gc_presence'):
|
if gajim.config.get('send_sha_in_gc_presence'):
|
||||||
p = self.add_sha(p)
|
p = self.add_sha(p)
|
||||||
self.add_lang(p)
|
self.add_lang(p)
|
||||||
|
if not change_nick:
|
||||||
t = p.setTag(common.xmpp.NS_MUC + ' x')
|
t = p.setTag(common.xmpp.NS_MUC + ' x')
|
||||||
if password:
|
if password:
|
||||||
t.setTagData('password', password)
|
t.setTagData('password', password)
|
||||||
|
|
|
@ -1440,7 +1440,8 @@ class GroupchatControl(ChatControlBase):
|
||||||
dialogs.ErrorDialog(_('Invalid nickname'),
|
dialogs.ErrorDialog(_('Invalid nickname'),
|
||||||
_('The nickname has not allowed characters.'))
|
_('The nickname has not allowed characters.'))
|
||||||
return True
|
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.new_nick = nick
|
||||||
self.clear(self.msg_textview)
|
self.clear(self.msg_textview)
|
||||||
else:
|
else:
|
||||||
|
@ -1723,7 +1724,8 @@ class GroupchatControl(ChatControlBase):
|
||||||
dialogs.ErrorDialog(_('Invalid nickname'),
|
dialogs.ErrorDialog(_('Invalid nickname'),
|
||||||
_('The nickname has not allowed characters.'))
|
_('The nickname has not allowed characters.'))
|
||||||
return
|
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]:
|
if gajim.gc_connected[self.account][self.room_jid]:
|
||||||
# We are changing nick, we will change self.nick when we receive
|
# We are changing nick, we will change self.nick when we receive
|
||||||
# presence that inform that it works
|
# presence that inform that it works
|
||||||
|
|
Loading…
Add table
Reference in a new issue