diff --git a/src/global/actions/api/bots.ts b/src/global/actions/api/bots.ts index 50a61c5d5..2cfa71da0 100644 --- a/src/global/actions/api/bots.ts +++ b/src/global/actions/api/bots.ts @@ -639,7 +639,7 @@ addActionHandler('requestAppWebView', async (global, actions, payload): Promise< return; } - if (botApp.isInactive && !selectIsTrustedBot(global, botId)) { + if (botApp.isInactive || !selectIsTrustedBot(global, botId)) { global = updateTabState(global, { botTrustRequest: { botId, diff --git a/src/global/selectors/chats.ts b/src/global/selectors/chats.ts index 6b0eaf55a..32f73526f 100644 --- a/src/global/selectors/chats.ts +++ b/src/global/selectors/chats.ts @@ -87,8 +87,7 @@ export function selectChatOnlineCount(global: T, chat: Ap } export function selectIsTrustedBot(global: T, botId: string) { - const bot = selectUser(global, botId); - return bot && (bot.isVerified || global.trustedBotIds.includes(botId)); + return global.trustedBotIds.includes(botId); } export function selectChatType(global: T, chatId: string) : ApiChatType | undefined {