From eeab646bfa0d4787a2611f9c07514ddbb10ee441 Mon Sep 17 00:00:00 2001 From: Sangeeth Saravanaraj Date: Sat, 1 Aug 2015 17:47:03 +0530 Subject: Retaining 'id' in the response and error stanzas --- sleekxmpp/plugins/xep_0332/http.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sleekxmpp') diff --git a/sleekxmpp/plugins/xep_0332/http.py b/sleekxmpp/plugins/xep_0332/http.py index 03d88b65..92e2546f 100644 --- a/sleekxmpp/plugins/xep_0332/http.py +++ b/sleekxmpp/plugins/xep_0332/http.py @@ -127,6 +127,8 @@ class XEP_0332(BasePlugin): iq['http-resp']['code'] = code iq['http-resp']['message'] = message iq['http-resp']['version'] = '1.1' # TODO: set this implicitly + if 'id' in kwargs: + iq['id'] = kwargs["id"] if data is not None: iq['http-resp']['data'] = data return iq.send( @@ -145,6 +147,8 @@ class XEP_0332(BasePlugin): iq['error']['code'] = ecode iq['error']['type'] = etype iq['error']['condition'] = econd + if 'id' in kwargs: + iq['id'] = kwargs["id"] return iq.send( timeout=kwargs.get('timeout', None), block=kwargs.get('block', True), -- cgit v1.2.3