From e1e286aa138ca5a2fc5a341798be0089ec1fe904 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 25 Jul 2017 22:38:08 +0300 Subject: [PATCH] Allow to fast share not games to channels. Fixes #3692. --- Telegram/SourceFiles/history/history_message.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/history_message.cpp b/Telegram/SourceFiles/history/history_message.cpp index 28c8fa9ee..8bab8ab71 100644 --- a/Telegram/SourceFiles/history/history_message.cpp +++ b/Telegram/SourceFiles/history/history_message.cpp @@ -177,6 +177,7 @@ void FastShareMessage(gsl::not_null item) { OrderedSet requests; }; auto data = MakeShared(item->fullId()); + auto isGame = item->getMessageBot() && item->getMedia() && (item->getMedia()->type() == MediaTypeGame); auto canCopyLink = item->hasDirectLink(); if (!canCopyLink) { @@ -264,10 +265,10 @@ void FastShareMessage(gsl::not_null item) { } } }; - auto filterCallback = [](PeerData *peer) { + auto filterCallback = [isGame](PeerData *peer) { if (peer->canWrite()) { if (auto channel = peer->asChannel()) { - return !channel->isBroadcast(); + return isGame ? (!channel->isBroadcast()) : true; } return true; }