2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Added manager of sponsored messages.

This commit is contained in:
23rd
2021-09-26 21:24:47 +03:00
committed by John Preston
parent 0c906a5e6d
commit eda5cd47ad
10 changed files with 301 additions and 2 deletions

View File

@@ -53,6 +53,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_chat_filters.h"
#include "data/data_scheduled_messages.h"
#include "data/data_send_action.h"
#include "data/data_sponsored_messages.h"
#include "data/data_cloud_themes.h"
#include "data/data_streaming.h"
#include "data/data_media_rotation.h"
@@ -239,7 +240,8 @@ Session::Session(not_null<Main::Session*> session)
, _streaming(std::make_unique<Streaming>(this))
, _mediaRotation(std::make_unique<MediaRotation>())
, _histories(std::make_unique<Histories>(this))
, _stickers(std::make_unique<Stickers>(this)) {
, _stickers(std::make_unique<Stickers>(this))
, _sponsoredMessages(std::make_unique<SponsoredMessages>(this)) {
_cache->open(_session->local().cacheKey());
_bigFileCache->open(_session->local().cacheBigFileKey());
@@ -280,6 +282,7 @@ void Session::clear() {
_histories->unloadAll();
_scheduledMessages = nullptr;
_sponsoredMessages = nullptr;
_dependentMessages.clear();
base::take(_messages);
base::take(_channelMessages);