diff sat/plugins/plugin_xep_0234.py @ 3527:bbf92ef05f38

plugin XEP-0166, XEP-0234: better management of `terminate`: - new `text` argument to specify human readable reason of termination - handling of `FirstError` (used when a error happens in a DeferredList) - handling of `StanzaError` - (XEP-0234): show human readable text of the reason if present
author Goffi <goffi@goffi.org>
date Wed, 05 May 2021 15:37:33 +0200
parents be6d91572633
children 3ef988734869
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0234.py	Wed May 05 15:37:33 2021 +0200
+++ b/sat/plugins/plugin_xep_0234.py	Wed May 05 15:37:33 2021 +0200
@@ -698,6 +698,8 @@
             first_child = jingle_elt.firstChildElement()
             if first_child is not None:
                 reason = first_child.name
+                if jingle_elt.text is not None:
+                    reason = f"{reason} - {jingle_elt.text}"
             else:
                 reason = C.PROGRESS_ERROR_FAILED
             self.host.bridge.progressError(