Fix requesting receipts on a message that has not been bound to a stream.

This commit is contained in:
Lance Stout 2012-03-16 23:42:55 -07:00
parent ab2e43d052
commit 33d01fb694

View file

@ -27,7 +27,8 @@ class Request(ElementBase):
parent = self.parent() parent = self.parent()
parent._set_sub_text("{%s}request" % self.namespace, keep=True) parent._set_sub_text("{%s}request" % self.namespace, keep=True)
if not parent['id']: if not parent['id']:
parent['id'] = parent.stream.new_id() if parent.stream:
parent['id'] = parent.stream.new_id()
def get_request_receipt(self): def get_request_receipt(self):
parent = self.parent() parent = self.parent()