mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 04:45:08 +01:00
Message: Fix redundant focusing to message from sender name
This commit is contained in:
parent
9251b468a5
commit
7f74b8cd99
@ -357,7 +357,8 @@ const Message: FC<OwnProps & StateProps> = ({
|
||||
chatId,
|
||||
threadId,
|
||||
isInDocumentGroup,
|
||||
Boolean(isScheduled),
|
||||
asForwarded,
|
||||
isScheduled,
|
||||
isRepliesChat,
|
||||
album,
|
||||
avatarPeer,
|
||||
|
@ -15,6 +15,7 @@ export default function useInnerHandlers(
|
||||
chatId: string,
|
||||
threadId: number,
|
||||
isInDocumentGroup: boolean,
|
||||
asForwarded?: boolean,
|
||||
isScheduled?: boolean,
|
||||
isChatWithRepliesBot?: boolean,
|
||||
album?: IAlbum,
|
||||
@ -50,14 +51,16 @@ export default function useInnerHandlers(
|
||||
return;
|
||||
}
|
||||
|
||||
if (forwardInfo?.channelPostId) {
|
||||
if (asForwarded && forwardInfo?.channelPostId) {
|
||||
focusMessage({ chatId: senderPeer.id, messageId: forwardInfo.channelPostId });
|
||||
} else if (isUserId(senderPeer.id)) {
|
||||
openUserInfo({ id: senderPeer.id });
|
||||
} else {
|
||||
openChat({ id: senderPeer.id });
|
||||
}
|
||||
}, [focusMessage, forwardInfo?.channelPostId, lang, openChat, openUserInfo, senderPeer, showNotification]);
|
||||
}, [
|
||||
asForwarded, focusMessage, forwardInfo, lang, openChat, openUserInfo, senderPeer, showNotification,
|
||||
]);
|
||||
|
||||
const handleViaBotClick = useCallback(() => {
|
||||
if (!botSender) {
|
||||
|
Loading…
Reference in New Issue
Block a user