Message: Fix focusing to forwarded channel post

This commit is contained in:
Alexander Zinchuk 2021-12-24 01:26:01 +01:00
parent f6a3828076
commit dac6c3a101

View File

@ -50,12 +50,14 @@ export default function useInnerHandlers(
return;
}
if (isUserId(senderPeer.id)) {
if (forwardInfo?.channelPostId) {
focusMessage({ chatId: senderPeer.id, messageId: forwardInfo.channelPostId });
} else if (isUserId(senderPeer.id)) {
openUserInfo({ id: senderPeer.id });
} else {
openChat({ id: senderPeer.id });
}
}, [senderPeer, showNotification, lang, openUserInfo, openChat]);
}, [focusMessage, forwardInfo?.channelPostId, lang, openChat, openUserInfo, senderPeer, showNotification]);
const handleViaBotClick = useCallback(() => {
if (!botSender) {