summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Taylor <bear42@gmail.com>2015-08-01 14:04:22 -0400
committerMike Taylor <bear42@gmail.com>2015-08-01 14:04:22 -0400
commitabcec1e2d3348cabf6f9f6fc26d31be1e2c6c9ed (patch)
tree21b0b1ca10764764e9c55e10b5322f9f659b97d3
parent2c69144189cc267de1fd293f3a2da7f79f86e572 (diff)
parenteeab646bfa0d4787a2611f9c07514ddbb10ee441 (diff)
downloadslixmpp-abcec1e2d3348cabf6f9f6fc26d31be1e2c6c9ed.tar.gz
slixmpp-abcec1e2d3348cabf6f9f6fc26d31be1e2c6c9ed.tar.bz2
slixmpp-abcec1e2d3348cabf6f9f6fc26d31be1e2c6c9ed.tar.xz
slixmpp-abcec1e2d3348cabf6f9f6fc26d31be1e2c6c9ed.zip
Merge pull request #388 from sangeeths/misc_updates
Retaining 'id' in the response and error stanzas
-rw-r--r--sleekxmpp/plugins/xep_0332/http.py4
1 files changed, 4 insertions, 0 deletions
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),