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

Allow wearing collectibles from emoji status.

This commit is contained in:
John Preston
2025-01-09 14:34:31 +04:00
parent d0132c0f7b
commit fecddb5203
23 changed files with 278 additions and 68 deletions

View File

@@ -33,6 +33,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_changes.h"
#include "data/data_chat_filters.h"
#include "data/data_send_action.h"
#include "data/data_star_gift.h"
#include "data/data_emoji_statuses.h"
#include "data/data_folder.h"
#include "data/data_forum.h"
#include "data/data_forum_topic.h"
@@ -1300,6 +1302,15 @@ void History::newItemAdded(not_null<HistoryItem*> item) {
if (const auto topic = item->topic()) {
topic->applyItemAdded(item);
}
if (const auto media = item->media()) {
if (const auto gift = media->gift()) {
if (const auto unique = gift->unique.get()) {
if (unique->ownerId == session().userPeerId()) {
owner().emojiStatuses().refreshCollectibles();
}
}
}
}
}
void History::registerClientSideMessage(not_null<HistoryItem*> item) {