Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2023-06-06 21:30:27 +0300
committerPhilipp Hörist <philipp@hoerist.com>2023-06-06 21:30:34 +0300
commit8827795ae4a2a204f14e5da637518395c192b4ee (patch)
tree1a67d444d0b4122d3182abc480880f55d9dcb426
parent24c826d68d882b77494be2f796f8c5bd35afee93 (diff)
[triggers] Consider only messages with body as event
Fixes #624
-rw-r--r--triggers/triggers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/triggers/triggers.py b/triggers/triggers.py
index caca12e..b52e264 100644
--- a/triggers/triggers.py
+++ b/triggers/triggers.py
@@ -76,6 +76,10 @@ class Triggers(GajimPlugin):
def _on_message_received(self, event: MessageEventsT) -> bool:
log.info('Process %s', event.name)
+ if not event.msgtxt:
+ log.info('Discard event because it has no message text')
+ return PROPAGATE_EVENT
+
result = self._check_all(event,
self._check_rule_apply_msg_received,
self._apply_rule)