plugin XEP-0077: disconnect client when deleting self account:
where profile's XMPP account is deleted, its client must be explicitely disconnected to avoid automatic reconnection, which would obviously fail.
This commit is contained in:
parent
06503f83aa
commit
876ec80598
1 changed files with 5 additions and 1 deletions
|
|
@ -303,4 +303,8 @@ class XEP_0077(object):
|
|||
iq_elt["to"] = to_jid.full()
|
||||
query_elt = iq_elt.addElement((NS_REG, "query"))
|
||||
query_elt.addElement("remove")
|
||||
return iq_elt.send()
|
||||
d = iq_elt.send()
|
||||
if not to_jid or to_jid == jid.JID(client.jid.host):
|
||||
d.addCallback(lambda __: client.entityDisconnect())
|
||||
return d
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue