mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-25 08:44:38 +00:00
Skip fwd_info for msgs from chat with yourself.
Server doesn't add fwd_info if a non-forwarded message is forwarded from chat with yourself so don't add it locally as well.
This commit is contained in:
parent
d2c6de3df6
commit
4659b664e7
@ -454,10 +454,13 @@ HistoryMessage::HistoryMessage(History *history, MsgId id, MTPDmessage::Flags fl
|
||||
: HistoryItem(history, id, newForwardedFlags(history->peer, from, fwd) | flags, date, from) {
|
||||
CreateConfig config;
|
||||
|
||||
config.authorIdOriginal = fwd->authorOriginal()->id;
|
||||
config.fromIdOriginal = fwd->fromOriginal()->id;
|
||||
if (fwd->authorOriginal()->isChannel()) {
|
||||
config.originalId = fwd->idOriginal();
|
||||
if (fwd->Has<HistoryMessageForwarded>() || !fwd->history()->peer->isSelf()) {
|
||||
// Server doesn't add "fwd_from" to non-forwarded messages from chat with yourself.
|
||||
config.authorIdOriginal = fwd->authorOriginal()->id;
|
||||
config.fromIdOriginal = fwd->fromOriginal()->id;
|
||||
if (fwd->authorOriginal()->isChannel()) {
|
||||
config.originalId = fwd->idOriginal();
|
||||
}
|
||||
}
|
||||
auto fwdViaBot = fwd->viaBot();
|
||||
if (fwdViaBot) config.viaBotId = peerToUser(fwdViaBot->id);
|
||||
|
Loading…
Reference in New Issue
Block a user