Fix t.me links to private chats (#1593)
This commit is contained in:
parent
23147c8af3
commit
8ca0f72060
@ -567,7 +567,7 @@ addReducer('openTelegramLink', (global, actions, payload) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const chatOrChannelPostId = part2 ? Number(part2) : undefined;
|
const chatOrChannelPostId = part2 || undefined;
|
||||||
const messageId = part3 ? Number(part3) : undefined;
|
const messageId = part3 ? Number(part3) : undefined;
|
||||||
const commentId = params.comment ? Number(params.comment) : undefined;
|
const commentId = params.comment ? Number(params.comment) : undefined;
|
||||||
|
|
||||||
@ -578,13 +578,13 @@ addReducer('openTelegramLink', (global, actions, payload) => {
|
|||||||
});
|
});
|
||||||
} else if (part1 === 'c' && chatOrChannelPostId && messageId) {
|
} else if (part1 === 'c' && chatOrChannelPostId && messageId) {
|
||||||
actions.focusMessage({
|
actions.focusMessage({
|
||||||
chatId: -chatOrChannelPostId,
|
chatId: `-${chatOrChannelPostId}`,
|
||||||
messageId,
|
messageId,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
actions.openChatByUsername({
|
actions.openChatByUsername({
|
||||||
username: part1,
|
username: part1,
|
||||||
messageId: messageId || chatOrChannelPostId,
|
messageId: messageId || Number(chatOrChannelPostId),
|
||||||
commentId,
|
commentId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,7 +54,7 @@ export const processDeepLink = (url: string) => {
|
|||||||
} = params;
|
} = params;
|
||||||
|
|
||||||
focusMessage({
|
focusMessage({
|
||||||
chatId: -Number(channel),
|
chatId: `-${channel}`,
|
||||||
id: post,
|
id: post,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user