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

Method inputUser

Telegram/SourceFiles/data/data_user.cpp:333–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331}
332
333MTPInputUser UserData::inputUser() const {
334 const auto item = isLoaded() ? nullptr : owner().messageWithPeer(id);
335 if (item) {
336 const auto peer = item->history()->peer;
337 Assert(peer.get() != this);
338
339 return MTP_inputUserFromMessage(
340 item->history()->peer->input(),
341 MTP_int(item->id.bare),
342 MTP_long(peerToUser(id).bare));
343 } else if (isSelf()) {
344 return MTP_inputUserSelf();
345 }
346 return MTP_inputUser(
347 MTP_long(peerToUser(id).bare),
348 MTP_long(_accessHash));
349}
350
351void UserData::setName(
352 const QString &newFirstName,

Callers 15

requestFullPeerMethod · 0.80
deleteConversationMethod · 0.80
refreshFileReferenceMethod · 0.80
sendBotStartMethod · 0.80
onInlineRequestMethod · 0.80
resolveAppMethod · 0.80
requestButtonMethod · 0.80
requestSimpleMethod · 0.80
requestMainMethod · 0.80
startedMethod · 0.80
botSendDataMethod · 0.80

Calls 7

MTP_longFunction · 0.85
peerToUserFunction · 0.85
messageWithPeerMethod · 0.80
MTP_intFunction · 0.70
historyMethod · 0.45
getMethod · 0.45
inputMethod · 0.45

Tested by

no test coverage detected