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

Method skipRequest

Telegram/SourceFiles/api/api_send_progress.cpp:154–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154bool SendProgressManager::skipRequest(const Key &key) const {
155 const auto user = key.history->peer->asUser();
156 if (!user) {
157 return false;
158 } else if (user->isSelf()) {
159 return true;
160 } else if (user->isBot() && !user->isSupport()) {
161 return true;
162 }
163 const auto recently = base::unixtime::now() - kSendTypingsToOfflineFor;
164 const auto lastseen = user->lastseen();
165 if (lastseen.isRecently()) {
166 return false;
167 } else if (const auto value = lastseen.onlineTill()) {
168 return (value < recently);
169 }
170 return true;
171}
172
173void SendProgressManager::done(mtpRequestId requestId) {
174 for (auto i = _requests.begin(), e = _requests.end(); i != e; ++i) {

Callers

nothing calls this directly

Calls 7

asUserMethod · 0.80
isSelfMethod · 0.80
isSupportMethod · 0.80
lastseenMethod · 0.80
isRecentlyMethod · 0.80
onlineTillMethod · 0.80
isBotMethod · 0.45

Tested by

no test coverage detected