Show fast share button in personal chats.

This commit is contained in:
John Preston 2018-05-30 01:18:10 +03:00
parent 03037121aa
commit e42e973ed5
1 changed files with 5 additions and 1 deletions

View File

@ -1349,7 +1349,11 @@ bool Message::displayFastShare() const {
if (peer->isChannel()) {
return !peer->isMegagroup();
} else if (const auto user = peer->asUser()) {
if (user->botInfo && !item->out()) {
if (const auto forwarded = item->Get<HistoryMessageForwarded>()) {
return !peer->isSelf()
&& forwarded->originalSender->isChannel()
&& !forwarded->originalSender->isMegagroup();
} else if (user->botInfo && !item->out()) {
if (const auto media = this->media()) {
return media->allowsFastShare();
}