2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Create / move forum topics on new messages.

This commit is contained in:
John Preston
2022-09-23 23:21:31 +04:00
parent 388fe6adfb
commit eaf679916a
19 changed files with 155 additions and 58 deletions

View File

@@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/view/history_view_service_message.h"
#include "history/view/history_view_item_preview.h"
#include "data/data_folder.h"
#include "data/data_forum.h"
#include "data/data_session.h"
#include "data/data_media_types.h"
#include "data/data_game.h"
@@ -771,6 +772,10 @@ void HistoryService::applyAction(const MTPMessageAction &action) {
this,
_from,
data.vmonths().v);
}, [&](const MTPDmessageActionTopicCreate &data) {
if (const auto forum = history()->peer->forum()) {
forum->applyTopicAdded(id, qs(data.vtitle()));
}
}, [](const auto &) {
});
}