Message List: Fix infinite spinner when missing access to chat (#1599)

This commit is contained in:
Alexander Zinchuk 2021-12-21 12:17:12 +03:00
parent 99b9347ddf
commit 46bdaea297

View File

@ -577,8 +577,15 @@ addReducer('openTelegramLink', (global, actions, payload) => {
inviteHash: params.voicechat || params.livestream, inviteHash: params.voicechat || params.livestream,
}); });
} else if (part1 === 'c' && chatOrChannelPostId && messageId) { } else if (part1 === 'c' && chatOrChannelPostId && messageId) {
const chatId = `-${chatOrChannelPostId}`;
const chat = selectChat(global, chatId);
if (!chat) {
actions.showNotification({ message: 'Chat does not exist' });
return;
}
actions.focusMessage({ actions.focusMessage({
chatId: `-${chatOrChannelPostId}`, chatId,
messageId, messageId,
}); });
} else { } else {