summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-03-16 23:42:55 -0700
committerLance Stout <lancestout@gmail.com>2012-03-16 23:42:55 -0700
commit33d01fb69411f68db9f44eb59562888306a0c143 (patch)
treeeef4fe1afc8e7e33c40c30a43049efe0bc40881f /sleekxmpp/plugins
parentab2e43d052b91653f17310c7947e7813e24ca4a7 (diff)
downloadslixmpp-33d01fb69411f68db9f44eb59562888306a0c143.tar.gz
slixmpp-33d01fb69411f68db9f44eb59562888306a0c143.tar.bz2
slixmpp-33d01fb69411f68db9f44eb59562888306a0c143.tar.xz
slixmpp-33d01fb69411f68db9f44eb59562888306a0c143.zip
Fix requesting receipts on a message that has not been bound to a stream.
Diffstat (limited to 'sleekxmpp/plugins')
-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()