summaryrefslogtreecommitdiff
path: root/slixmpp/stanza/iq.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-09 20:40:30 +0200
committermathieui <mathieui@mathieui.net>2021-04-09 20:40:30 +0200
commitfcf666e3cb2f2656020a73e94df332f996924511 (patch)
tree35d71a04ec7d68e11e5ce0f5df29272dfb018687 /slixmpp/stanza/iq.py
parent7ddcc3428fbc48814da301ce7cba9b1f855a0fa9 (diff)
downloadslixmpp-fcf666e3cb2f2656020a73e94df332f996924511.tar.gz
slixmpp-fcf666e3cb2f2656020a73e94df332f996924511.tar.bz2
slixmpp-fcf666e3cb2f2656020a73e94df332f996924511.tar.xz
slixmpp-fcf666e3cb2f2656020a73e94df332f996924511.zip
Fix #3441: Do not assign ID to inbound stanzas
Diffstat (limited to 'slixmpp/stanza/iq.py')
-rw-r--r--slixmpp/stanza/iq.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/slixmpp/stanza/iq.py b/slixmpp/stanza/iq.py
index 0242308e..044c9df8 100644
--- a/slixmpp/stanza/iq.py
+++ b/slixmpp/stanza/iq.py
@@ -58,14 +58,14 @@ class Iq(RootStanza):
types = {'get', 'result', 'set', 'error'}
plugin_attrib = name
- def __init__(self, *args, **kwargs):
+ def __init__(self, *args, recv=False, **kwargs):
"""
Initialize a new <iq> stanza with an '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:
self['id'] = self.stream.new_id()
else: