Update API scheme on layer 145.

This commit is contained in:
John Preston
2022-08-19 15:38:11 +03:00
parent fa26afaf9a
commit f658cb7e99
6 changed files with 40 additions and 18 deletions
+22 -5
View File
@@ -2345,11 +2345,17 @@ void Updates::feedUpdate(const MTPUpdate &update) {
} break;
case mtpc_updateStickerSets: {
// Can't determine is it masks or stickers, so update both.
session().data().stickers().setLastUpdate(0);
session().api().updateStickers();
session().data().stickers().setLastMasksUpdate(0);
session().api().updateMasks();
const auto &d = update.c_updateStickerSets();
if (d.is_emojis()) {
session().data().stickers().setLastEmojiUpdate(0);
session().api().updateCustomEmoji();
} else if (d.is_masks()) {
session().data().stickers().setLastMasksUpdate(0);
session().api().updateMasks();
} else {
session().data().stickers().setLastUpdate(0);
session().api().updateStickers();
}
} break;
case mtpc_updateRecentStickers: {
@@ -2370,6 +2376,17 @@ void Updates::feedUpdate(const MTPUpdate &update) {
session().api().updateStickers();
} break;
case mtpc_updateReadFeaturedEmojiStickers: {
// We don't track read status of them for now.
} break;
case mtpc_updateUserEmojiStatus: {
const auto &d = update.c_updateUserEmojiStatus();
if (const auto user = session().data().userLoaded(d.vuser_id())) {
user->setEmojiStatus(d.vemoji_status());
}
} break;
////// Cloud saved GIFs
case mtpc_updateSavedGifs: {
session().data().stickers().setLastSavedGifsUpdate(0);