summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-11-11 21:47:52 +0100
committermathieui <mathieui@mathieui.net>2011-11-11 21:49:27 +0100
commitea5692544ad196b90d64e46d7b43ae8c68c34e64 (patch)
treed06fced6e8c982aa959ab093f699e15647c33cdf /src/tabs.py
parent50d5c6b8b26dd66342a66ccd84bc8f68709bc724 (diff)
downloadpoezio-ea5692544ad196b90d64e46d7b43ae8c68c34e64.tar.gz
poezio-ea5692544ad196b90d64e46d7b43ae8c68c34e64.tar.bz2
poezio-ea5692544ad196b90d64e46d7b43ae8c68c34e64.tar.xz
poezio-ea5692544ad196b90d64e46d7b43ae8c68c34e64.zip
Fixes presence handhake
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 1e5775fc..5a1a33a3 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -1491,7 +1491,6 @@ class RosterInfoTab(Tab):
self.core.information(_('No JID specified'), 'Error')
return
self.core.xmpp.sendPresence(pto=jid, ptype='subscribe')
- self.core.xmpp.sendPresence(pto=jid, ptype='subscribed')
def command_name(self, args):
"""
@@ -1588,6 +1587,7 @@ class RosterInfoTab(Tab):
else:
self.core.information('No roster item to remove')
return
+ self.core.xmpp.sendPresence(pto=jid, ptype='unavailable')
self.core.xmpp.sendPresence(pto=jid, ptype='unsubscribe')
self.core.xmpp.sendPresence(pto=jid, ptype='unsubscribed')
self.core.xmpp.del_roster_item(jid=jid)
@@ -1719,6 +1719,12 @@ class RosterInfoTab(Tab):
else:
jid = args[0]
self.core.xmpp.sendPresence(pto=jid, ptype='subscribed')
+ self.core.xmpp.sendPresence(pto=jid, ptype='')
+ contact = roster.get_contact_by_jid(jid)
+ if not contact:
+ return
+ if contact.subscription in ('to', 'none'):
+ self.core.xmpp.sendPresence(pto=jid, ptype='subscribe')
def refresh(self):
if self.need_resize: