mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fix forwarded message original id. Closes #3305.
This commit is contained in:
@@ -790,6 +790,12 @@ public:
|
||||
}
|
||||
return author();
|
||||
}
|
||||
MsgId idOriginal() const {
|
||||
if (auto fwd = Get<HistoryMessageForwarded>()) {
|
||||
return fwd->_originalId;
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
// count > 0 - creates the unread bar if necessary and
|
||||
// sets unread messages count if bar is not freezed yet
|
||||
|
||||
@@ -457,7 +457,7 @@ HistoryMessage::HistoryMessage(History *history, MsgId id, MTPDmessage::Flags fl
|
||||
config.authorIdOriginal = fwd->authorOriginal()->id;
|
||||
config.fromIdOriginal = fwd->fromOriginal()->id;
|
||||
if (fwd->authorOriginal()->isChannel()) {
|
||||
config.originalId = fwd->id;
|
||||
config.originalId = fwd->idOriginal();
|
||||
}
|
||||
auto fwdViaBot = fwd->viaBot();
|
||||
if (fwdViaBot) config.viaBotId = peerToUser(fwdViaBot->id);
|
||||
|
||||
Reference in New Issue
Block a user