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

Method searchOnServer

Telegram/SourceFiles/boxes/peer_list_controllers.cpp:246–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void PeerListGlobalSearchController::searchOnServer() {
247 _requestId = _api.request(MTPcontacts_Search(
248 MTP_flags(0),
249 MTP_string(_query),
250 MTP_int(SearchPeopleLimit)
251 )).done([=](const MTPcontacts_Found &result, mtpRequestId requestId) {
252 searchDone(result, requestId);
253 }).fail([=](const MTP::Error &error, mtpRequestId requestId) {
254 if (_requestId == requestId) {
255 _requestId = 0;
256 delegate()->peerListSearchRefreshRows();
257 }
258 }).send();
259 _queries.emplace(_requestId, _query);
260}
261
262void PeerListGlobalSearchController::searchDone(
263 const MTPcontacts_Found &result,

Callers

nothing calls this directly

Calls 15

MTP_flagsFunction · 0.85
MTP_stringFunction · 0.85
emplaceMethod · 0.80
applyReceivedTopicsMethod · 0.80
rootIdMethod · 0.80
creationDateMethod · 0.80
MTP_intFunction · 0.50
sendMethod · 0.45
failMethod · 0.45
doneMethod · 0.45
requestMethod · 0.45

Tested by

no test coverage detected