mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-30 04:39:00 +01:00
Revert "Message: Show correct message sender when forwarding (#1784)"
This reverts commit 754ef496220dbbf6580d3a77d705578cd8cfb645.
This commit is contained in:
parent
8881cdf77d
commit
b5ae6d3205
@ -54,7 +54,7 @@ const EmbeddedMessage: FC<OwnProps> = ({
|
||||
|
||||
const lang = useLang();
|
||||
|
||||
const senderTitle = message?.forwardInfo?.hiddenUserName || (sender && getSenderTitle(lang, sender));
|
||||
const senderTitle = sender && getSenderTitle(lang, sender);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
@ -148,9 +148,10 @@ export default memo(withGlobal<OwnProps>(
|
||||
}
|
||||
|
||||
let sender: ApiChat | ApiUser | undefined;
|
||||
if ((isForwarding || replyingToId) && message) {
|
||||
if (replyingToId && message) {
|
||||
const { forwardInfo } = message;
|
||||
const isChatWithSelf = chatId === currentUserId;
|
||||
|
||||
if (forwardInfo && (forwardInfo.isChannelPost || isChatWithSelf)) {
|
||||
sender = selectForwardedSender(global, message);
|
||||
}
|
||||
@ -158,10 +159,8 @@ export default memo(withGlobal<OwnProps>(
|
||||
if (!sender) {
|
||||
sender = selectSender(global, message);
|
||||
}
|
||||
|
||||
if (!sender) {
|
||||
sender = isUserId(fromChatId!) ? selectUser(global, fromChatId!) : selectChat(global, fromChatId!);
|
||||
}
|
||||
} else if (isForwarding) {
|
||||
sender = isUserId(fromChatId!) ? selectUser(global, fromChatId!) : selectChat(global, fromChatId!);
|
||||
}
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user