From 889cf9cdcbaaf5b61797e7b71b7e08d956288e6f Mon Sep 17 00:00:00 2001 From: Tommaso Morganti Date: Mon, 13 Apr 2026 17:41:05 +0200 Subject: [PATCH 1/3] fix: feedback for MultiChatSpam --- src/middlewares/auto-moderation-stack/index.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/middlewares/auto-moderation-stack/index.ts b/src/middlewares/auto-moderation-stack/index.ts index 7b12711..f91a028 100644 --- a/src/middlewares/auto-moderation-stack/index.ts +++ b/src/middlewares/auto-moderation-stack/index.ts @@ -295,10 +295,23 @@ export class AutoModerationStack> exte const muteDuration = duration.zod.parse(MULTI_CHAT_SPAM.MUTE_DURATION) const res = await Moderation.multiChatSpam(ctx.from, similarMessages, muteDuration) - if (res.isErr()) { logger.error({ error: res.error }, "Cannot execute moderation action for MULTI_CHAT_SPAM") + return } + + void ephemeral( + ctx.reply( + fmt( + ({ i, b, n }) => [ + i`Message for ${fmtUser(ctx.from)}.`, + b`⚠️ Your message was detected as potential spam and has been deleted.`, + n`Please avoid sending similar messages to multiple groups/topics in a short period of time.`, + ], + { sep: "\n" } + ) + ) + ) } } } From 9162f0cdd1f1e85f6c38c7a466b1be744579deab Mon Sep 17 00:00:00 2001 From: Tommaso Morganti Date: Mon, 13 Apr 2026 19:09:47 +0200 Subject: [PATCH 2/3] fix: mute time --- src/middlewares/auto-moderation-stack/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middlewares/auto-moderation-stack/index.ts b/src/middlewares/auto-moderation-stack/index.ts index f91a028..ac7be95 100644 --- a/src/middlewares/auto-moderation-stack/index.ts +++ b/src/middlewares/auto-moderation-stack/index.ts @@ -306,7 +306,7 @@ export class AutoModerationStack> exte ({ i, b, n }) => [ i`Message for ${fmtUser(ctx.from)}.`, b`⚠️ Your message was detected as potential spam and has been deleted.`, - n`Please avoid sending similar messages to multiple groups/topics in a short period of time.`, + n`Please avoid sending similar messages to multiple groups/topics in a short period of time. Try again in 5 minutes.`, ], { sep: "\n" } ) From c694333d1d665a7463edeb766c5109bdd9ba1c9b Mon Sep 17 00:00:00 2001 From: Tommaso Morganti Date: Mon, 13 Apr 2026 19:10:35 +0200 Subject: [PATCH 3/3] Merge branch 'fix-108' of https://github.com/polinetworkorg/telegram into fix-108