summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sleekxmpp/basexmpp.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py
index f729132d..14b99823 100644
--- a/sleekxmpp/basexmpp.py
+++ b/sleekxmpp/basexmpp.py
@@ -674,11 +674,15 @@ class BaseXMPP(XMLStream):
def _handle_available(self, presence):
pto = presence['to'].bare
+ if not pto:
+ pto = self.boundjid.bare
pfrom = presence['from'].bare
self.roster[pto][pfrom].handle_available(presence)
def _handle_unavailable(self, presence):
pto = presence['to'].bare
+ if not pto:
+ pto = self.boundjid.bare
pfrom = presence['from'].bare
self.roster[pto][pfrom].handle_unavailable(presence)