Retract nickname from pubsub correctly

This commit is contained in:
Philipp Hörist 2017-08-08 19:58:20 +02:00
parent f3bdb596bd
commit c57af6dade
2 changed files with 2 additions and 2 deletions

View File

@ -836,8 +836,7 @@ class ConnectionPEP(object):
def retract_nickname(self):
if not self.pep_supported:
return
self.send_nickname(None)
# not all client support new XEP, so we still retract
self._pubsub_connection.send_pb_retract('', nbxmpp.NS_NICK, '0')
def send_location(self, info):

View File

@ -382,6 +382,7 @@ class ProfileWindow:
nick = vcard_['NICKNAME']
gajim.connections[self.account].send_nickname(nick)
if nick == '':
gajim.connections[self.account].retract_nickname()
nick = gajim.config.get_per('accounts', self.account, 'name')
gajim.nicks[self.account] = nick
gajim.connections[self.account].send_vcard(vcard_)