summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/xep_0030/disco.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/sleekxmpp/plugins/xep_0030/disco.py b/sleekxmpp/plugins/xep_0030/disco.py
index b08ce50d..53086d4e 100644
--- a/sleekxmpp/plugins/xep_0030/disco.py
+++ b/sleekxmpp/plugins/xep_0030/disco.py
@@ -551,11 +551,14 @@ class xep_0030(base_plugin):
jid,
iq['disco_info']['node'],
iq)
- iq.reply()
- if info:
- info = self._fix_default_info(info)
- iq.set_payload(info.xml)
- iq.send()
+ if isinstance(info, Iq):
+ info.send()
+ else:
+ iq.reply()
+ if info:
+ info = self._fix_default_info(info)
+ iq.set_payload(info.xml)
+ iq.send()
elif iq['type'] == 'result':
log.debug("Received disco info result from" + \
"%s to %s.", iq['from'], iq['to'])
@@ -581,10 +584,13 @@ class xep_0030(base_plugin):
jid,
iq['disco_items']['node'],
iq)
- iq.reply()
- if items:
- iq.set_payload(items.xml)
- iq.send()
+ if isinstance(items, Iq):
+ items.send()
+ else:
+ iq.reply()
+ if items:
+ iq.set_payload(items.xml)
+ iq.send()
elif iq['type'] == 'result':
log.debug("Received disco items result from" + \
"%s to %s.", iq['from'], iq['to'])