Show textual presence error if available

If there's a human-readable explanation of the error, it should be there.
This commit is contained in:
Kim Alvefur 2020-04-03 17:59:20 +02:00 committed by Maxime “pep” Buquet
parent 1942e087fd
commit ea53698fd7

View file

@ -1116,7 +1116,7 @@ class HandlerCore:
if not contact: if not contact:
return return
roster.modified() roster.modified()
contact.error = presence['error']['type'] + ': ' + presence['error']['condition'] contact.error = presence['error']['text'] or presence['error']['type'] + ': ' + presence['error']['condition']
# TODO: reset chat states status on presence error # TODO: reset chat states status on presence error
def on_got_offline(self, presence): def on_got_offline(self, presence):