upstream_changes #13
3 changed files with 11 additions and 0 deletions
|
@ -133,8 +133,10 @@ ListItem {
|
|||
if (messageListItem.messageReactions) {
|
||||
messageListItem.messageReactions = null;
|
||||
} else if (messageListItem.chatReactions) {
|
||||
Debug.log("Using chat reactions")
|
||||
messageListItem.messageReactions = chatReactions
|
||||
} else {
|
||||
Debug.log("Obtaining message reactions")
|
||||
tdLibWrapper.getMessageAvailableReactions(messageListItem.chatId, messageListItem.messageId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,6 +127,7 @@ TDLibReceiver::TDLibReceiver(void *tdLibClient, QObject *parent) : QThread(paren
|
|||
handlers.insert("updateSupergroup", &TDLibReceiver::processUpdateSuperGroup);
|
||||
handlers.insert("updateChatOnlineMemberCount", &TDLibReceiver::processChatOnlineMemberCountUpdated);
|
||||
handlers.insert("messages", &TDLibReceiver::processMessages);
|
||||
handlers.insert("foundChatMessages", &TDLibReceiver::processFoundChatMessages);
|
||||
handlers.insert("sponsoredMessage", &TDLibReceiver::processSponsoredMessage); // TdLib <= 1.8.7
|
||||
handlers.insert("sponsoredMessages", &TDLibReceiver::processSponsoredMessages); // TdLib >= 1.8.8
|
||||
handlers.insert("updateNewMessage", &TDLibReceiver::processUpdateNewMessage);
|
||||
|
@ -390,6 +391,13 @@ void TDLibReceiver::processMessages(const QVariantMap &receivedInformation)
|
|||
emit messagesReceived(cleanupList(receivedInformation.value(MESSAGES).toList()), total_count);
|
||||
}
|
||||
|
||||
void TDLibReceiver::processFoundChatMessages(const QVariantMap &receivedInformation)
|
||||
{
|
||||
const int total_count = receivedInformation.value(TOTAL_COUNT).toInt();
|
||||
LOG("Received found chat messages, amount: " << total_count);
|
||||
emit messagesReceived(cleanupList(receivedInformation.value(MESSAGES).toList()), total_count);
|
||||
}
|
||||
|
||||
void TDLibReceiver::processSponsoredMessage(const QVariantMap &receivedInformation)
|
||||
{
|
||||
// TdLib <= 1.8.7
|
||||
|
|
|
@ -139,6 +139,7 @@ private:
|
|||
void processUpdateSuperGroup(const QVariantMap &receivedInformation);
|
||||
void processChatOnlineMemberCountUpdated(const QVariantMap &receivedInformation);
|
||||
void processMessages(const QVariantMap &receivedInformation);
|
||||
void processFoundChatMessages(const QVariantMap &receivedInformation);
|
||||
void processSponsoredMessage(const QVariantMap &receivedInformation);
|
||||
void processSponsoredMessages(const QVariantMap &receivedInformation);
|
||||
void processUpdateNewMessage(const QVariantMap &receivedInformation);
|
||||
|
|
Loading…
Reference in a new issue