From 2b922bc3293b44fd630e415b40ad7b84c9b66c13 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Thu, 30 Dec 2021 14:19:46 +0100 Subject: [PATCH] Temporarily ignore "terms" restriction reason for chats (#1613) --- src/api/gramjs/apiBuilders/chats.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/gramjs/apiBuilders/chats.ts b/src/api/gramjs/apiBuilders/chats.ts index 40a77fcda..068365171 100644 --- a/src/api/gramjs/apiBuilders/chats.ts +++ b/src/api/gramjs/apiBuilders/chats.ts @@ -178,7 +178,7 @@ function buildApiChatRestrictionReason( return undefined; } - const targetReason = restrictionReasons.find(({ platform }) => platform === 'all'); + const targetReason = restrictionReasons.find(({ platform, reason }) => platform === 'all' && reason !== 'terms'); return targetReason ? pick(targetReason, ['reason', 'text']) : undefined; }