Mercurial > libervia-backend
comparison libervia/backend/core/xmpp.py @ 4168:d67eaa684484
core (message): fix calling of post treatments during message workflow
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 01 Dec 2023 18:20:27 +0100 |
parents | 18026ce0819c |
children | 4dc00e848961 |
comparison
equal
deleted
inserted
replaced
4167:319a0e47dc8b | 4168:d67eaa684484 |
---|---|
1363 "message_received", client, message_elt, post_treat | 1363 "message_received", client, message_elt, post_treat |
1364 ): | 1364 ): |
1365 return | 1365 return |
1366 try: | 1366 try: |
1367 data = self.parse_message(message_elt) | 1367 data = self.parse_message(message_elt) |
1368 # we now do all post treatments added by plugins | |
1369 post_treat.callback(data) | |
1370 await post_treat | |
1368 | 1371 |
1369 self.complete_attachments(data) | 1372 self.complete_attachments(data) |
1370 if not data["message"] and not data["extra"] and not data["subject"]: | 1373 if not data["message"] and not data["extra"] and not data["subject"]: |
1371 raise exceptions.CancelError("Cancelled empty message") | 1374 raise exceptions.CancelError("Cancelled empty message") |
1372 if not client.is_component or client.receiveHistory: | 1375 if not client.is_component or client.receiveHistory: |