summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-12-25 23:20:12 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2018-12-26 10:47:33 +0000
commit25f15233e076f5e2d28de7a1f7ab1c378b7104f3 (patch)
tree8b858774a57a580ca93523389f4071cf11f886f8 /plugins
parentf034f7d0000560711070053e7e0d51193e61d12c (diff)
downloadpoezio-25f15233e076f5e2d28de7a1f7ab1c378b7104f3.tar.gz
poezio-25f15233e076f5e2d28de7a1f7ab1c378b7104f3.tar.bz2
poezio-25f15233e076f5e2d28de7a1f7ab1c378b7104f3.tar.xz
poezio-25f15233e076f5e2d28de7a1f7ab1c378b7104f3.zip
disco plugin: Add iq error reporting
Previously it behaved as if the response was empty, which was confusing.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/disco.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/disco.py b/plugins/disco.py
index f6769146..ec0a04cd 100644
--- a/plugins/disco.py
+++ b/plugins/disco.py
@@ -29,6 +29,10 @@ class Plugin(BasePlugin):
help='Get the disco#info of a JID')
def on_disco(self, iq):
+ if iq['type'] == 'error':
+ self.api.information(iq['error']['text'] or iq['error']['condition'], 'Error')
+ return
+
info = iq['disco_info']
identities = (str(identity) for identity in info['identities'])
self.api.information('\n'.join(identities), 'Identities')