Deep links: Fix optional number parsing (#2248)
This commit is contained in:
parent
556c4c0b21
commit
ec89513851
@ -40,7 +40,7 @@ export const processDeepLink = (url: string) => {
|
|||||||
|
|
||||||
const startAttach = params.hasOwnProperty('startattach') && !startattach ? true : startattach;
|
const startAttach = params.hasOwnProperty('startattach') && !startattach ? true : startattach;
|
||||||
const choose = parseChooseParameter(params.choose);
|
const choose = parseChooseParameter(params.choose);
|
||||||
const threadId = Number(thread) || Number(topic);
|
const threadId = Number(thread) || Number(topic) || undefined;
|
||||||
|
|
||||||
if (domain !== 'telegrampassport') {
|
if (domain !== 'telegrampassport') {
|
||||||
if (startAttach && choose) {
|
if (startAttach && choose) {
|
||||||
@ -59,8 +59,8 @@ export const processDeepLink = (url: string) => {
|
|||||||
} else {
|
} else {
|
||||||
openChatByUsername({
|
openChatByUsername({
|
||||||
username: domain,
|
username: domain,
|
||||||
messageId: Number(post),
|
messageId: post ? Number(post) : undefined,
|
||||||
commentId: Number(comment),
|
commentId: comment ? Number(comment) : undefined,
|
||||||
startParam: start,
|
startParam: start,
|
||||||
startAttach,
|
startAttach,
|
||||||
attach,
|
attach,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user