From 25f15233e076f5e2d28de7a1f7ab1c378b7104f3 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 25 Dec 2018 23:20:12 +0100 Subject: disco plugin: Add iq error reporting Previously it behaved as if the response was empty, which was confusing. --- plugins/disco.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') 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') -- cgit v1.2.3