diff --git a/src/components/common/EmbeddedMessage.tsx b/src/components/common/EmbeddedMessage.tsx index e168182d..b0931d43 100644 --- a/src/components/common/EmbeddedMessage.tsx +++ b/src/components/common/EmbeddedMessage.tsx @@ -54,7 +54,7 @@ const EmbeddedMessage: FC = ({ const lang = useLang(); - const senderTitle = sender && getSenderTitle(lang, sender); + const senderTitle = message?.forwardInfo?.hiddenUserName || (sender && getSenderTitle(lang, sender)); return (
( } let sender: ApiChat | ApiUser | undefined; - if (replyingToId && message) { + if ((isForwarding || replyingToId) && message) { const { forwardInfo } = message; const isChatWithSelf = chatId === currentUserId; - if (forwardInfo && (forwardInfo.isChannelPost || isChatWithSelf)) { sender = selectForwardedSender(global, message); } @@ -159,8 +158,10 @@ export default memo(withGlobal( if (!sender) { sender = selectSender(global, message); } - } else if (isForwarding) { - sender = isUserId(fromChatId!) ? selectUser(global, fromChatId!) : selectChat(global, fromChatId!); + + if (!sender) { + sender = isUserId(fromChatId!) ? selectUser(global, fromChatId!) : selectChat(global, fromChatId!); + } } return {