mirror of https://github.com/procxx/kepka.git
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) {
|
: HistoryItem(history, id, newForwardedFlags(history->peer, from, fwd) | flags, date, from) {
|
||||||
CreateConfig config;
|
CreateConfig config;
|
||||||
|
|
||||||
config.authorIdOriginal = fwd->authorOriginal()->id;
|
if (fwd->Has<HistoryMessageForwarded>() || !fwd->history()->peer->isSelf()) {
|
||||||
config.fromIdOriginal = fwd->fromOriginal()->id;
|
// Server doesn't add "fwd_from" to non-forwarded messages from chat with yourself.
|
||||||
if (fwd->authorOriginal()->isChannel()) {
|
config.authorIdOriginal = fwd->authorOriginal()->id;
|
||||||
config.originalId = fwd->idOriginal();
|
config.fromIdOriginal = fwd->fromOriginal()->id;
|
||||||
|
if (fwd->authorOriginal()->isChannel()) {
|
||||||
|
config.originalId = fwd->idOriginal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
auto fwdViaBot = fwd->viaBot();
|
auto fwdViaBot = fwd->viaBot();
|
||||||
if (fwdViaBot) config.viaBotId = peerToUser(fwdViaBot->id);
|
if (fwdViaBot) config.viaBotId = peerToUser(fwdViaBot->id);
|
||||||
|
|
Loading…
Reference in New Issue