| 2583 | } |
| 2584 | |
| 2585 | void 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 | |
| 2608 | void Session::applyDialog( |
| 2609 | Data::Folder *requestFolder, |
nothing calls this directly
no test coverage detected