This commit is contained in:
Nikolay Sinyov 2024-05-04 21:15:09 +03:00
parent 234a84ac04
commit 659cf4e8ca

View file

@ -1633,23 +1633,16 @@ QVariantMap TDLibWrapper::getChat(const QString &chatId)
QStringList TDLibWrapper::getChatReactions(const QString &chatId) QStringList TDLibWrapper::getChatReactions(const QString &chatId)
{ {
<<<<<<< HEAD
LOG("Obtaining chat reactions for chat" << chatId); LOG("Obtaining chat reactions for chat" << chatId);
=======
>>>>>>> 1ee8d13 (Adapt to changes in TdLib (#524))
const QVariant available_reactions(chats.value(chatId).toMap().value(CHAT_AVAILABLE_REACTIONS)); const QVariant available_reactions(chats.value(chatId).toMap().value(CHAT_AVAILABLE_REACTIONS));
const QVariantMap map(available_reactions.toMap()); const QVariantMap map(available_reactions.toMap());
const QString reactions_type(map.value(_TYPE).toString()); const QString reactions_type(map.value(_TYPE).toString());
if (reactions_type == CHAT_AVAILABLE_REACTIONS_ALL) { if (reactions_type == CHAT_AVAILABLE_REACTIONS_ALL) {
<<<<<<< HEAD
LOG("Chat uses all available reactions, currently available number" << activeEmojiReactions.size()); LOG("Chat uses all available reactions, currently available number" << activeEmojiReactions.size());
return activeEmojiReactions; return activeEmojiReactions;
} else if (reactions_type == CHAT_AVAILABLE_REACTIONS_SOME) { } else if (reactions_type == CHAT_AVAILABLE_REACTIONS_SOME) {
LOG("Chat uses reduced set of reactions"); LOG("Chat uses reduced set of reactions");
=======
return activeEmojiReactions;
} else if (reactions_type == CHAT_AVAILABLE_REACTIONS_SOME) {
>>>>>>> 1ee8d13 (Adapt to changes in TdLib (#524))
const QVariantList reactions(map.value(REACTIONS).toList()); const QVariantList reactions(map.value(REACTIONS).toList());
const int n = reactions.count(); const int n = reactions.count();
QStringList emojis; QStringList emojis;
@ -1671,7 +1664,6 @@ QStringList TDLibWrapper::getChatReactions(const QString &chatId)
} }
} }
} }
<<<<<<< HEAD
LOG("Found emojis for this chat" << emojis.size()); LOG("Found emojis for this chat" << emojis.size());
return emojis; return emojis;
} else if (reactions_type.isEmpty()) { } else if (reactions_type.isEmpty()) {
@ -1679,12 +1671,6 @@ QStringList TDLibWrapper::getChatReactions(const QString &chatId)
return available_reactions.toStringList(); return available_reactions.toStringList();
} else { } else {
LOG("Unknown chat reaction type" << reactions_type); LOG("Unknown chat reaction type" << reactions_type);
=======
return emojis;
} else if (reactions_type.isEmpty()) {
return available_reactions.toStringList();
} else {
>>>>>>> 1ee8d13 (Adapt to changes in TdLib (#524))
return QStringList(); return QStringList();
} }
} }