fix changing account name. Fixes #5891
This commit is contained in:
parent
da524c94fd
commit
35039100ff
|
@ -502,6 +502,9 @@ class ConnectionPEP(object):
|
|||
self._pubsub_connection = pubsub_connection
|
||||
self.reset_awaiting_pep()
|
||||
|
||||
def pep_change_account_name(self, new_name):
|
||||
self._account = new_name
|
||||
|
||||
def reset_awaiting_pep(self):
|
||||
self.to_be_sent_activity = None
|
||||
self.to_be_sent_mood = None
|
||||
|
|
|
@ -38,6 +38,9 @@ class ConnectionCaps(object):
|
|||
self._capscache = capscache
|
||||
self._create_suitable_client_caps = client_caps_factory
|
||||
|
||||
def caps_change_account_name(self, new_name):
|
||||
self._account = new_name
|
||||
|
||||
def _capsPresenceCB(self, con, presence):
|
||||
"""
|
||||
XMMPPY callback method to handle retrieved caps info
|
||||
|
|
|
@ -2055,6 +2055,8 @@ class AccountsWindow:
|
|||
del gajim.gajim_optional_features[old_name]
|
||||
del gajim.caps_hash[old_name]
|
||||
gajim.connections[old_name].name = new_name
|
||||
gajim.connections[old_name].pep_change_account_name(new_name)
|
||||
gajim.connections[old_name].caps_change_account_name(new_name)
|
||||
gajim.connections[new_name] = gajim.connections[old_name]
|
||||
del gajim.connections[old_name]
|
||||
gajim.config.add_per('accounts', new_name)
|
||||
|
|
Loading…
Reference in New Issue