Replies Bot: Fix reply display (#3961)

This commit is contained in:
Alexander Zinchuk 2023-11-10 13:55:27 +04:00
parent e59b002b5f
commit 1eea365bb2
2 changed files with 3 additions and 3 deletions

View File

@ -1486,11 +1486,11 @@ export default memo(withGlobal<OwnProps>(
? selectChatMessage(global, replyToPeerId || chatId, replyToMsgId)
: undefined;
const forwardHeader = forwardInfo || replyFrom;
const replyMessageSender = replyMessage ? selectReplySender(global, replyMessage) : forwardHeader
const replyMessageSender = replyMessage ? selectReplySender(global, replyMessage) : forwardHeader && !isRepliesChat
? selectSenderFromHeader(global, forwardHeader) : undefined;
const replyMessageForwardSender = replyMessage && selectForwardedSender(global, replyMessage);
const replyMessageChat = replyToPeerId ? selectChat(global, replyToPeerId) : undefined;
const isReplyPrivate = replyMessageChat && !isChatPublic(replyMessageChat)
const isReplyPrivate = !isRepliesChat && replyMessageChat && !isChatPublic(replyMessageChat)
&& (replyMessageChat.isNotJoined || replyMessageChat.isRestricted);
const isReplyToTopicStart = replyMessage?.content.action?.type === 'topicCreate';
const replyStory = storyReplyId && storyReplyUserId

View File

@ -85,7 +85,7 @@ export default function useInnerHandlers(
focusMessage({
chatId: replyToPeerId || chatId,
threadId,
threadId: replyToTopId || threadId,
messageId: replyToMsgId,
replyMessageId: replyToPeerId ? undefined : messageId,
noForumTopicPanel: !replyToPeerId ? true : undefined, // Open topic panel for cross-chat replies