Ping: properly process IQ errors, always display error condition
This commit is contained in:
parent
12136b48a5
commit
6fb3151202
1 changed files with 7 additions and 4 deletions
|
@ -69,7 +69,10 @@ class Plugin(BasePlugin):
|
|||
if iq['type'] == 'error':
|
||||
error_condition = iq['error']['condition']
|
||||
reply = error_condition
|
||||
if error_condition in ('remote-server-timeout', 'remote-server-not-found'):
|
||||
# These IQ errors are not ping errors:
|
||||
# 'service-unavailable': official "not supported" response as of RFC6120 (§8.4) and XEP-0199 (§4.1)
|
||||
# 'feature-not-implemented': inoffcial not-supported response from many clients
|
||||
if error_condition not in ('service-unavailable', 'feature-not-implemented'):
|
||||
error = True
|
||||
error_text = iq['error']['text']
|
||||
if error_text:
|
||||
|
|
Loading…
Reference in a new issue