Mini Apps: Fix links opening (#4514)
This commit is contained in:
parent
42c504f805
commit
30fe7cdc08
@ -425,9 +425,7 @@ export function deleteChatScheduledMessages<T extends GlobalState>(
|
||||
byChatId: {
|
||||
...global.scheduledMessages.byChatId,
|
||||
[chatId]: {
|
||||
byId: {
|
||||
...newById,
|
||||
},
|
||||
byId: newById,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -60,6 +60,9 @@ interface PublicUsernameOrBotLink {
|
||||
type: 'publicUsernameOrBotLink';
|
||||
username: string;
|
||||
start?: string;
|
||||
startApp?: string;
|
||||
startAttach?: string;
|
||||
attach?: string;
|
||||
text?: string;
|
||||
}
|
||||
|
||||
@ -182,6 +185,9 @@ function parseTgLink(url: URL) {
|
||||
username: queryParams.domain,
|
||||
start: queryParams.start,
|
||||
text: queryParams.text,
|
||||
startApp: queryParams.startapp,
|
||||
startAttach: queryParams.startattach,
|
||||
attach: queryParams.attach,
|
||||
});
|
||||
case 'businessChatLink':
|
||||
return buildBusinessChatLink({ slug: queryParams.slug });
|
||||
@ -266,6 +272,9 @@ function parseHttpLink(url: URL) {
|
||||
username: pathParams[0],
|
||||
start: queryParams.start,
|
||||
text: queryParams.text,
|
||||
startApp: queryParams.startapp,
|
||||
startAttach: queryParams.startattach,
|
||||
attach: queryParams.attach,
|
||||
});
|
||||
case 'businessChatLink':
|
||||
return buildBusinessChatLink({ slug: pathParams[1] });
|
||||
@ -487,6 +496,9 @@ function buildPublicUsernameOrBotLink(
|
||||
username,
|
||||
start,
|
||||
text,
|
||||
startApp,
|
||||
startAttach,
|
||||
attach,
|
||||
} = params;
|
||||
if (!username) {
|
||||
return undefined;
|
||||
@ -498,6 +510,9 @@ function buildPublicUsernameOrBotLink(
|
||||
type: 'publicUsernameOrBotLink',
|
||||
username,
|
||||
start,
|
||||
startApp,
|
||||
startAttach,
|
||||
attach,
|
||||
text,
|
||||
};
|
||||
}
|
||||
|
||||
@ -22,6 +22,9 @@ export const processDeepLink = (url: string): boolean => {
|
||||
username: parsedLink.username,
|
||||
startParam: parsedLink.start,
|
||||
text: parsedLink.text,
|
||||
startApp: parsedLink.startApp,
|
||||
startAttach: parsedLink.startAttach,
|
||||
attach: parsedLink.attach,
|
||||
});
|
||||
return true;
|
||||
case 'businessChatLink':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user