From 8b0176fa5aadbf39d559a25d5721cc47e4845a20 Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:43:25 +0100 Subject: [PATCH] fix: unban at federation level --- lib/cron.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cron.ts b/lib/cron.ts index b058542..5c478ad 100644 --- a/lib/cron.ts +++ b/lib/cron.ts @@ -677,7 +677,7 @@ const handleTelegramUpdate = async (db: any, bot: TelegramBot, settings: groupSe } if (settings.enforcement) for (const group of groups){ - queue.add(async () => {try{await (bot as any).restrictChatMember(moderationInfo.UserHistory.group.groupID, moderationInfo.UserHistory.user.userID, lift)}catch{}}); + queue.add(async () => {try{await (bot as any).restrictChatMember(group.group_id, moderationInfo.UserHistory.user.userID, lift)}catch{}}); } const msg_update = settings.lang === "en" ? `*${moderationInfo.UserHistory.user.username}*'s has no other active reports. All bans should be lifted.` : `*${moderationInfo.UserHistory.user.username}* no tiene otros informes activos. Todas las prohibiciones deben ser levantadas.` if (settings.federation_id && fedNotificationChannel)