2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Allow setting group stickers set.

This commit is contained in:
John Preston
2017-08-05 12:48:21 +02:00
parent ab35829358
commit f04b25ea26
16 changed files with 140 additions and 87 deletions

View File

@@ -927,7 +927,7 @@ void ApiWrap::saveStickerSets(const Stickers::Order &localOrder, const Stickers:
if (writeArchived) Local::writeArchivedStickers();
if (writeCloudRecent) Local::writeRecentStickers();
if (writeFaved) Local::writeFavedStickers();
emit App::main()->stickersUpdated();
Auth().data().stickersUpdated().notify(true);
if (_stickerSetDisenableRequests.isEmpty()) {
stickersSaveOrder();
@@ -1466,6 +1466,13 @@ void ApiWrap::updateStickers() {
requestSavedGifs(now);
}
void ApiWrap::setGroupStickerSet(gsl::not_null<ChannelData*> megagroup, const MTPInputStickerSet &set) {
Expects(megagroup->mgInfo != nullptr);
megagroup->mgInfo->stickerSet = set;
request(MTPchannels_SetStickers(megagroup->inputChannel, set)).send();
Auth().data().stickersUpdated().notify(true);
}
void ApiWrap::requestStickers(TimeId now) {
if (Global::LastStickersUpdate() != 0 && now < Global::LastStickersUpdate() + kStickersUpdateTimeout) {
return;