diff --git a/Telegram/SourceFiles/history/history_item.h b/Telegram/SourceFiles/history/history_item.h index d325cc441..fde9d6564 100644 --- a/Telegram/SourceFiles/history/history_item.h +++ b/Telegram/SourceFiles/history/history_item.h @@ -790,6 +790,12 @@ public: } return author(); } + MsgId idOriginal() const { + if (auto fwd = Get()) { + return fwd->_originalId; + } + return id; + } // count > 0 - creates the unread bar if necessary and // sets unread messages count if bar is not freezed yet diff --git a/Telegram/SourceFiles/history/history_message.cpp b/Telegram/SourceFiles/history/history_message.cpp index 1da442d93..683902645 100644 --- a/Telegram/SourceFiles/history/history_message.cpp +++ b/Telegram/SourceFiles/history/history_message.cpp @@ -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);