| 77 | } |
| 78 | |
| 79 | PeerData *Key::peer() const { |
| 80 | if (const auto peer = std::get_if<not_null<PeerData*>>(&_value)) { |
| 81 | return *peer; |
| 82 | } else if (const auto topic = this->topic()) { |
| 83 | return topic->peer(); |
| 84 | } else if (const auto sublist = this->sublist()) { |
| 85 | return sublist->owningHistory()->peer; |
| 86 | } |
| 87 | return nullptr; |
| 88 | } |
| 89 | |
| 90 | Data::ForumTopic *Key::topic() const { |
| 91 | if (const auto topic = std::get_if<not_null<Data::ForumTopic*>>( |
no test coverage detected