| 59 | }; |
| 60 | |
| 61 | [[nodiscard]] uint64 PeerAccessHash(not_null<PeerData*> peer) { |
| 62 | if (const auto user = peer->asUser()) { |
| 63 | return user->accessHash(); |
| 64 | } else if (const auto channel = peer->asChannel()) { |
| 65 | return channel->accessHash(); |
| 66 | } |
| 67 | return 0; |
| 68 | } |
| 69 | |
| 70 | [[nodiscard]] bool ItemContainsMedia(const DownloadObject &object) { |
| 71 | if (const auto iv = object.item->Get<HistoryMessageMediaForInstantView>()) { |
no test coverage detected