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: {
|
byChatId: {
|
||||||
...global.scheduledMessages.byChatId,
|
...global.scheduledMessages.byChatId,
|
||||||
[chatId]: {
|
[chatId]: {
|
||||||
byId: {
|
byId: newById,
|
||||||
...newById,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -60,6 +60,9 @@ interface PublicUsernameOrBotLink {
|
|||||||
type: 'publicUsernameOrBotLink';
|
type: 'publicUsernameOrBotLink';
|
||||||
username: string;
|
username: string;
|
||||||
start?: string;
|
start?: string;
|
||||||
|
startApp?: string;
|
||||||
|
startAttach?: string;
|
||||||
|
attach?: string;
|
||||||
text?: string;
|
text?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,6 +185,9 @@ function parseTgLink(url: URL) {
|
|||||||
username: queryParams.domain,
|
username: queryParams.domain,
|
||||||
start: queryParams.start,
|
start: queryParams.start,
|
||||||
text: queryParams.text,
|
text: queryParams.text,
|
||||||
|
startApp: queryParams.startapp,
|
||||||
|
startAttach: queryParams.startattach,
|
||||||
|
attach: queryParams.attach,
|
||||||
});
|
});
|
||||||
case 'businessChatLink':
|
case 'businessChatLink':
|
||||||
return buildBusinessChatLink({ slug: queryParams.slug });
|
return buildBusinessChatLink({ slug: queryParams.slug });
|
||||||
@ -266,6 +272,9 @@ function parseHttpLink(url: URL) {
|
|||||||
username: pathParams[0],
|
username: pathParams[0],
|
||||||
start: queryParams.start,
|
start: queryParams.start,
|
||||||
text: queryParams.text,
|
text: queryParams.text,
|
||||||
|
startApp: queryParams.startapp,
|
||||||
|
startAttach: queryParams.startattach,
|
||||||
|
attach: queryParams.attach,
|
||||||
});
|
});
|
||||||
case 'businessChatLink':
|
case 'businessChatLink':
|
||||||
return buildBusinessChatLink({ slug: pathParams[1] });
|
return buildBusinessChatLink({ slug: pathParams[1] });
|
||||||
@ -487,6 +496,9 @@ function buildPublicUsernameOrBotLink(
|
|||||||
username,
|
username,
|
||||||
start,
|
start,
|
||||||
text,
|
text,
|
||||||
|
startApp,
|
||||||
|
startAttach,
|
||||||
|
attach,
|
||||||
} = params;
|
} = params;
|
||||||
if (!username) {
|
if (!username) {
|
||||||
return undefined;
|
return undefined;
|
||||||
@ -498,6 +510,9 @@ function buildPublicUsernameOrBotLink(
|
|||||||
type: 'publicUsernameOrBotLink',
|
type: 'publicUsernameOrBotLink',
|
||||||
username,
|
username,
|
||||||
start,
|
start,
|
||||||
|
startApp,
|
||||||
|
startAttach,
|
||||||
|
attach,
|
||||||
text,
|
text,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,6 +22,9 @@ export const processDeepLink = (url: string): boolean => {
|
|||||||
username: parsedLink.username,
|
username: parsedLink.username,
|
||||||
startParam: parsedLink.start,
|
startParam: parsedLink.start,
|
||||||
text: parsedLink.text,
|
text: parsedLink.text,
|
||||||
|
startApp: parsedLink.startApp,
|
||||||
|
startAttach: parsedLink.startAttach,
|
||||||
|
attach: parsedLink.attach,
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
case 'businessChatLink':
|
case 'businessChatLink':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user