summaryrefslogtreecommitdiff
path: root/slixmpp/stanza/presence.py
diff options
context:
space:
mode:
Diffstat (limited to 'slixmpp/stanza/presence.py')
-rw-r--r--slixmpp/stanza/presence.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/slixmpp/stanza/presence.py b/slixmpp/stanza/presence.py
index 1a3b7c78..a0742a95 100644
--- a/slixmpp/stanza/presence.py
+++ b/slixmpp/stanza/presence.py
@@ -5,6 +5,7 @@
# See the file LICENSE for copying permission.
from slixmpp.stanza.rootstanza import RootStanza
from slixmpp.xmlstream import StanzaBase
+from slixmpp.basexmpp import BaseXMPP
class Presence(RootStanza):
@@ -69,7 +70,7 @@ class Presence(RootStanza):
"""
StanzaBase.__init__(self, *args, **kwargs)
if not recv and self['id'] == '':
- if self.stream is not None and self.stream.use_presence_ids:
+ if isinstance(self.stream, BaseXMPP) and self.stream.use_presence_ids:
self['id'] = self.stream.new_id()
def set_show(self, show: str):