diff --git a/Telegram/SourceFiles/history/history_message.cpp b/Telegram/SourceFiles/history/history_message.cpp index e266574596..829e2dd3cb 100644 --- a/Telegram/SourceFiles/history/history_message.cpp +++ b/Telegram/SourceFiles/history/history_message.cpp @@ -602,9 +602,11 @@ HistoryMessage::HistoryMessage( if (const auto fwdViaBot = original->viaBot()) { config.viaBotId = peerToUser(fwdViaBot->id); } else if (originalMedia && originalMedia->game()) { - if (const auto user = original->history()->peer->asUser()) { - if (user->isBot()) { - config.viaBotId = peerToUser(user->id); + if (const auto sender = original->senderOriginal()) { + if (const auto user = sender->asUser()) { + if (user->isBot()) { + config.viaBotId = peerToUser(user->id); + } } } }