From 9286dfef3adced785a03ee1bf6e5df2129ca347f Mon Sep 17 00:00:00 2001 From: Dawid Rejowski Date: Tue, 13 Sep 2022 03:41:05 +0200 Subject: [PATCH] Do not respond to m.notice --- stickerbridge/callbacks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stickerbridge/callbacks.py b/stickerbridge/callbacks.py index adf8927..f0bcc79 100644 --- a/stickerbridge/callbacks.py +++ b/stickerbridge/callbacks.py @@ -25,6 +25,10 @@ class Callbacks: if event.sender == self.client.user: return + # Do not respond to m.notice (https://spec.matrix.org/v1.3/client-server-api/#mnotice) + if event.source['content']['msgtype'] == 'm.notice': + return + if event.body.startswith(self.command_prefix) or room.member_count <= 2: command_string = event.body.replace(self.command_prefix, '').strip() command = Command(self.client, room, command_string, self.tg_exporter)