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;
|
||||
}
|
||||
|
||||
const chatOrChannelPostId = part2 ? Number(part2) : undefined;
|
||||
const chatOrChannelPostId = part2 || undefined;
|
||||
const messageId = part3 ? Number(part3) : undefined;
|
||||
const commentId = params.comment ? Number(params.comment) : undefined;
|
||||
|
||||
@ -578,13 +578,13 @@ addReducer('openTelegramLink', (global, actions, payload) => {
|
||||
});
|
||||
} else if (part1 === 'c' && chatOrChannelPostId && messageId) {
|
||||
actions.focusMessage({
|
||||
chatId: -chatOrChannelPostId,
|
||||
chatId: `-${chatOrChannelPostId}`,
|
||||
messageId,
|
||||
});
|
||||
} else {
|
||||
actions.openChatByUsername({
|
||||
username: part1,
|
||||
messageId: messageId || chatOrChannelPostId,
|
||||
messageId: messageId || Number(chatOrChannelPostId),
|
||||
commentId,
|
||||
});
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ export const processDeepLink = (url: string) => {
|
||||
} = params;
|
||||
|
||||
focusMessage({
|
||||
chatId: -Number(channel),
|
||||
chatId: `-${channel}`,
|
||||
id: post,
|
||||
});
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user