changeset 4265:2417ad1d0f23

core (xmpp): fix message workflow interruption from trigger.
author Goffi <goffi@goffi.org>
date Wed, 12 Jun 2024 22:37:04 +0200
parents 3fbd1a1285c1
children 9fc3d28bc3f6
files libervia/backend/core/xmpp.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/backend/core/xmpp.py	Wed Jun 12 22:36:15 2024 +0200
+++ b/libervia/backend/core/xmpp.py	Wed Jun 12 22:37:04 2024 +0200
@@ -1383,10 +1383,16 @@
             message_elt,
             async_point_d
         )
-        await async_point_d
+        trigger_ret_continue = await async_point_d
+
         if delayed_call.active():
             delayed_call.cancel()
             log.debug(f"delayed_call for {async_point_d} cancelled")
+
+        if not trigger_ret_continue:
+            # trigger returned False, we stop the workflow.
+            return
+
         try:
             data = self.parse_message(message_elt)
             # we now do all post treatments added by plugins