mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Display channel posts in discussion groups.
This commit is contained in:
@@ -553,8 +553,16 @@ int HistoryMessage::viewsCount() const {
|
||||
return HistoryItem::viewsCount();
|
||||
}
|
||||
|
||||
bool HistoryMessage::displayForwardedAsOriginal() const {
|
||||
if (const auto forwarded = Get<HistoryMessageForwarded>()) {
|
||||
const auto peer = history()->peer;
|
||||
return peer->isSelf() || (peer->isMegagroup() && (peer == from()));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
PeerData *HistoryMessage::displayFrom() const {
|
||||
return history()->peer->isSelf()
|
||||
return displayForwardedAsOriginal()
|
||||
? senderOriginal()
|
||||
: author().get();
|
||||
}
|
||||
|
Reference in New Issue
Block a user