Temporarily ignore "terms" restriction reason for chats (#1613)

This commit is contained in:
Alexander Zinchuk 2021-12-30 14:19:46 +01:00
parent 253d7d8542
commit 2b922bc329

View File

@ -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;
}