Fix forward of a bot message with a game from a group.

This commit is contained in:
John Preston 2021-08-18 16:43:22 +03:00
parent c5c94276c2
commit 4dd58b79e9
1 changed files with 5 additions and 3 deletions

View File

@ -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);
}
}
}
}