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

Method applyDialog

Telegram/SourceFiles/data/data_session.cpp:2585–2606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2583}
2584
2585void Session::applyDialog(
2586 Data::Folder *requestFolder,
2587 const MTPDdialog &data) {
2588 const auto peerId = peerFromMTP(data.vpeer());
2589 if (!peerId) {
2590 return;
2591 }
2592
2593 const auto history = this->history(peerId);
2594 history->applyDialog(requestFolder, data);
2595 setPinnedFromEntryList(history, data.is_pinned());
2596
2597 if (const auto from = history->peer->migrateFrom()) {
2598 if (const auto historyFrom = historyLoaded(from)) {
2599 removeChatListEntry(historyFrom);
2600 }
2601 } else if (const auto to = history->peer->migrateTo()) {
2602 if (to->amIn()) {
2603 removeChatListEntry(history);
2604 }
2605 }
2606}
2607
2608void Session::applyDialog(
2609 Data::Folder *requestFolder,

Callers

nothing calls this directly

Calls 5

historyMethod · 0.95
peerFromMTPFunction · 0.85
migrateToMethod · 0.80
migrateFromMethod · 0.45
amInMethod · 0.45

Tested by

no test coverage detected