From 33d01fb69411f68db9f44eb59562888306a0c143 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 16 Mar 2012 23:42:55 -0700 Subject: [PATCH] Fix requesting receipts on a message that has not been bound to a stream. --- sleekxmpp/plugins/xep_0184/stanza.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()