2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 16:45:12 +00:00

Update API scheme, simplify auto-delete.

This commit is contained in:
John Preston
2021-02-15 14:31:04 +04:00
parent 05488022c7
commit 781e7a2e79
13 changed files with 95 additions and 192 deletions

View File

@@ -1824,11 +1824,7 @@ void Updates::feedUpdate(const MTPUpdate &update) {
const auto &d = update.c_updatePeerHistoryTTL();
const auto peerId = peerFromMTP(d.vpeer());
if (const auto peer = session().data().peerLoaded(peerId)) {
if (const auto ttl = d.vttl()) {
peer->applyMessagesTTL(*ttl);
} else {
peer->setMessagesTTL(0, 0, false);
}
peer->setMessagesTTL(d.vttl_period().value_or_empty());
}
} break;