diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index a5e75414a..920415f2c 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -788,6 +788,8 @@ HistoryServiceDependentData *HistoryItem::GetServiceDependentData() { return info; } else if (const auto same = Get()) { return same; + } else if (const auto results = Get()) { + return results; } return nullptr; } @@ -3705,6 +3707,8 @@ void HistoryItem::createServiceFromMtp(const MTPDmessageService &message) { } else { RemoveComponents(HistoryServiceSameBackground::Bit()); } + } else if (type == mtpc_messageActionGiveawayResults) { + UpdateComponents(HistoryServiceGiveawayResults::Bit()); } if (const auto replyTo = message.vreply_to()) { replyTo->match([&](const MTPDmessageReplyHeader &data) { diff --git a/Telegram/SourceFiles/history/history_item_components.h b/Telegram/SourceFiles/history/history_item_components.h index 0cce4e499..d2ada01e1 100644 --- a/Telegram/SourceFiles/history/history_item_components.h +++ b/Telegram/SourceFiles/history/history_item_components.h @@ -599,6 +599,11 @@ struct HistoryServiceSameBackground , public HistoryServiceDependentData { }; +struct HistoryServiceGiveawayResults +: public RuntimeComponent +, public HistoryServiceDependentData { +}; + enum class HistorySelfDestructType { Photo, Video, diff --git a/Telegram/SourceFiles/history/view/history_view_service_message.cpp b/Telegram/SourceFiles/history/view/history_view_service_message.cpp index b9b27a168..319a2980a 100644 --- a/Telegram/SourceFiles/history/view/history_view_service_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_service_message.cpp @@ -673,6 +673,8 @@ TextState Service::textState(QPoint point, StateRequest request) const { } } else if (const auto same = item->Get()) { result.link = same->lnk; + } else if (const auto results = item->Get()) { + result.link = results->lnk; } else if (media && data()->showSimilarChannels()) { result = media->textState(mediaPoint, request); }