MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / messageWithPeer

Method messageWithPeer

Telegram/SourceFiles/data/data_session.cpp:5812–5829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5810}
5811
5812HistoryItem *Session::messageWithPeer(PeerId id) const {
5813 if (id == _session->userPeerId()) {
5814 return nullptr;
5815 }
5816 const auto i = _messagesWithPeer.find(id);
5817 if (i == end(_messagesWithPeer)) {
5818 return nullptr;
5819 }
5820 auto &list = i->second;
5821 for (auto j = begin(list); j != end(list);) {
5822 if (const auto item = message(*j)) {
5823 return item;
5824 }
5825 j = list.erase(j);
5826 }
5827 _messagesWithPeer.erase(i);
5828 return nullptr;
5829}
5830
5831} // namespace Data

Callers 4

inputChannelMethod · 0.80
inputUserMethod · 0.80
CollectMentionUserFunction · 0.80
MentionNameEntityFunction · 0.80

Calls 3

userPeerIdMethod · 0.80
findMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected