Deep links: Fix optional number parsing (#2248)

This commit is contained in:
Alexander Zinchuk 2023-01-07 19:09:06 +01:00
parent 556c4c0b21
commit ec89513851

View File

@ -40,7 +40,7 @@ export const processDeepLink = (url: string) => {
const startAttach = params.hasOwnProperty('startattach') && !startattach ? true : startattach;
const choose = parseChooseParameter(params.choose);
const threadId = Number(thread) || Number(topic);
const threadId = Number(thread) || Number(topic) || undefined;
if (domain !== 'telegrampassport') {
if (startAttach && choose) {
@ -59,8 +59,8 @@ export const processDeepLink = (url: string) => {
} else {
openChatByUsername({
username: domain,
messageId: Number(post),
commentId: Number(comment),
messageId: post ? Number(post) : undefined,
commentId: comment ? Number(comment) : undefined,
startParam: start,
startAttach,
attach,