2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Support topic on-the-fly creation.

This commit is contained in:
John Preston
2022-10-04 19:34:45 +04:00
parent 065d2e2ac9
commit 3722e55b67
32 changed files with 447 additions and 130 deletions

View File

@@ -1534,7 +1534,8 @@ void Updates::feedUpdate(const MTPUpdate &update) {
const auto randomId = d.vrandom_id().v;
if (const auto id = session().data().messageIdByRandomId(randomId)) {
const auto newId = d.vid().v;
if (const auto local = session().data().message(id)) {
auto &owner = session().data();
if (const auto local = owner.message(id)) {
if (local->isScheduled()) {
session().data().scheduledMessages().apply(d, local);
} else {
@@ -1552,6 +1553,8 @@ void Updates::feedUpdate(const MTPUpdate &update) {
local->setRealId(d.vid().v);
}
}
} else {
owner.histories().checkTopicCreated(id, newId);
}
session().data().unregisterMessageRandomId(randomId);
}