summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0184
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/plugins/xep_0184')
-rw-r--r--sleekxmpp/plugins/xep_0184/stanza.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0184/stanza.py b/sleekxmpp/plugins/xep_0184/stanza.py
index a50f6762..a7607035 100644
--- a/sleekxmpp/plugins/xep_0184/stanza.py
+++ b/sleekxmpp/plugins/xep_0184/stanza.py
@@ -27,7 +27,8 @@ class Request(ElementBase):
parent = self.parent()
parent._set_sub_text("{%s}request" % self.namespace, keep=True)
if not parent['id']:
- parent['id'] = parent.stream.new_id()
+ if parent.stream:
+ parent['id'] = parent.stream.new_id()
def get_request_receipt(self):
parent = self.parent()