2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

Correctly display discussion posts sender.

This commit is contained in:
John Preston
2019-05-25 17:05:57 +02:00
parent 01054858a4
commit a64c8c52b4
7 changed files with 37 additions and 46 deletions

View File

@@ -740,14 +740,8 @@ void RowPainter::paint(
auto history = item->history();
auto cloudDraft = nullptr;
const auto from = [&] {
if (const auto searchChat = row->searchInChat()) {
if (const auto peer = searchChat.peer()) {
if (peer->isSelf()) {
return item->senderOriginal();
} else if (!peer->isChannel() || peer->isMegagroup()) {
return item->from().get();
}
}
if (row->searchInChat()) {
return item->displayFrom();
}
return history->peer->migrateTo()
? history->peer->migrateTo()