diff --git a/src/components/modals/webApp/WebAppModalTabContent.tsx b/src/components/modals/webApp/WebAppModalTabContent.tsx index cee8a7b22..76363b594 100644 --- a/src/components/modals/webApp/WebAppModalTabContent.tsx +++ b/src/components/modals/webApp/WebAppModalTabContent.tsx @@ -382,9 +382,9 @@ const WebAppModalTabContent: FC = ({ function handleEvent(event: WebAppInboundEvent) { const { eventType, eventData } = event; - if (eventType === 'web_app_open_tg_link' && !isPaymentModalOpen) { + if (eventType === 'web_app_open_tg_link') { const linkUrl = TME_LINK_PREFIX + eventData.path_full; - openTelegramLink({ url: linkUrl }); + openTelegramLink({ url: linkUrl, shouldIgnoreCache: eventData.force_request }); closeActiveWebApp(); } diff --git a/src/global/actions/api/chats.ts b/src/global/actions/api/chats.ts index 96c75bd82..3625f5c24 100644 --- a/src/global/actions/api/chats.ts +++ b/src/global/actions/api/chats.ts @@ -1270,6 +1270,7 @@ addActionHandler('openChatByPhoneNumber', async (global, actions, payload): Prom addActionHandler('openTelegramLink', async (global, actions, payload): Promise => { const { url, + shouldIgnoreCache, tabId = getCurrentTabId(), } = payload; @@ -1357,6 +1358,7 @@ addActionHandler('openTelegramLink', async (global, actions, payload): Promise => { }); addActionHandler('openStickerSet', async (global, actions, payload): Promise => { - const { stickerSetInfo, tabId = getCurrentTabId() } = payload; - if (!selectStickerSet(global, stickerSetInfo)) { + const { stickerSetInfo, shouldIgnoreCache, tabId = getCurrentTabId() } = payload; + if (shouldIgnoreCache || !selectStickerSet(global, stickerSetInfo)) { await loadStickers(global, actions, stickerSetInfo); } diff --git a/src/global/types.ts b/src/global/types.ts index 048c06b9c..9708a206e 100644 --- a/src/global/types.ts +++ b/src/global/types.ts @@ -1813,6 +1813,7 @@ export interface ActionPayloads { }; openTelegramLink: { url: string; + shouldIgnoreCache?: boolean; } & WithTabId; resolveBusinessChatLink: { slug: string; @@ -2997,7 +2998,10 @@ export interface ActionPayloads { stickerSet: ApiStickerSet; }; - openStickerSet: { stickerSetInfo: ApiStickerSetInfo } & WithTabId; + openStickerSet: { + stickerSetInfo: ApiStickerSetInfo; + shouldIgnoreCache?: boolean; + } & WithTabId; closeStickerSetModal: WithTabId | undefined; loadStickersForEmoji: { diff --git a/src/types/webapp.ts b/src/types/webapp.ts index 9e80a7f90..9d2bb0cb8 100644 --- a/src/types/webapp.ts +++ b/src/types/webapp.ts @@ -47,6 +47,7 @@ export type WebAppInboundEvent = }> | WebAppEvent<'web_app_open_tg_link', { path_full: string; + force_request?: boolean; }> | WebAppEvent<'web_app_open_invoice', { slug: string;