From 75fcbd03cea23ac548ddfbef83703c55e8731779 Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 25 Mar 2024 14:35:04 +0000 Subject: [PATCH] echobot: ignore info messages --- chatmaild/src/chatmaild/echo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chatmaild/src/chatmaild/echo.py b/chatmaild/src/chatmaild/echo.py index 180663c..6e36d57 100644 --- a/chatmaild/src/chatmaild/echo.py +++ b/chatmaild/src/chatmaild/echo.py @@ -48,6 +48,9 @@ def on_group_name_changed(event): @hooks.on(events.NewMessage(func=lambda e: not e.command)) def echo(event): snapshot = event.message_snapshot + if snapshot.is_info: + # Ignore info messages + return if snapshot.text or snapshot.file: snapshot.chat.send_message(text=snapshot.text, file=snapshot.file)