diff options
Diffstat (limited to 'slixmpp/stanza/presence.py')
-rw-r--r-- | slixmpp/stanza/presence.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/slixmpp/stanza/presence.py b/slixmpp/stanza/presence.py index 297fcfea..022e7133 100644 --- a/slixmpp/stanza/presence.py +++ b/slixmpp/stanza/presence.py @@ -61,14 +61,14 @@ class Presence(RootStanza): 'subscribed', 'unsubscribe', 'unsubscribed'} showtypes = {'dnd', 'chat', 'xa', 'away'} - def __init__(self, *args, **kwargs): + def __init__(self, *args, recv=False, **kwargs): """ Initialize a new <presence /> stanza with an optional 'id' value. Overrides StanzaBase.__init__. """ StanzaBase.__init__(self, *args, **kwargs) - if self['id'] == '': + if not recv and self['id'] == '': if self.stream is not None and self.stream.use_presence_ids: self['id'] = self.stream.new_id() |