Support updateMessageReactions.
This commit is contained in:
parent
739d2b292d
commit
7c4d333a77
@ -6810,6 +6810,11 @@ void MessagesManager::on_update_message_forward_count(FullMessageId full_message
|
||||
update_message_interaction_info(full_message_id, -1, forward_count, false, nullptr, false, nullptr);
|
||||
}
|
||||
|
||||
void MessagesManager::on_update_message_reactions(FullMessageId full_message_id,
|
||||
tl_object_ptr<telegram_api::messageReactions> &&reactions) {
|
||||
update_message_interaction_info(full_message_id, -1, -1, false, nullptr, true, std::move(reactions));
|
||||
}
|
||||
|
||||
void MessagesManager::on_update_message_interaction_info(FullMessageId full_message_id, int32 view_count,
|
||||
int32 forward_count, bool has_reply_info,
|
||||
tl_object_ptr<telegram_api::messageReplies> &&reply_info,
|
||||
|
@ -336,6 +336,9 @@ class MessagesManager final : public Actor {
|
||||
|
||||
void on_update_message_forward_count(FullMessageId full_message_id, int32 forward_count);
|
||||
|
||||
void on_update_message_reactions(FullMessageId full_message_id,
|
||||
tl_object_ptr<telegram_api::messageReactions> &&reactions);
|
||||
|
||||
void on_update_message_interaction_info(FullMessageId full_message_id, int32 view_count, int32 forward_count,
|
||||
bool has_reply_info, tl_object_ptr<telegram_api::messageReplies> &&reply_info,
|
||||
bool has_reactions,
|
||||
|
@ -2701,6 +2701,12 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateChannelWebPage>
|
||||
promise.set_value(Unit());
|
||||
}
|
||||
|
||||
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateMessageReactions> update, Promise<Unit> &&promise) {
|
||||
td_->messages_manager_->on_update_message_reactions(
|
||||
{DialogId(update->peer_), MessageId(ServerMessageId(update->msg_id_))}, std::move(update->reactions_));
|
||||
promise.set_value(Unit());
|
||||
}
|
||||
|
||||
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateFolderPeers> update, Promise<Unit> &&promise) {
|
||||
for (auto &folder_peer : update->folder_peers_) {
|
||||
DialogId dialog_id(folder_peer->peer_);
|
||||
@ -3280,8 +3286,4 @@ void UpdatesManager::on_update(tl_object_ptr<telegram_api::updatePendingJoinRequ
|
||||
|
||||
// unsupported updates
|
||||
|
||||
void UpdatesManager::on_update(tl_object_ptr<telegram_api::updateMessageReactions> update, Promise<Unit> &&promise) {
|
||||
promise.set_value(Unit());
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
@ -384,6 +384,8 @@ class UpdatesManager final : public Actor {
|
||||
void on_update(tl_object_ptr<telegram_api::updateWebPage> update, Promise<Unit> &&promise);
|
||||
void on_update(tl_object_ptr<telegram_api::updateChannelWebPage> update, Promise<Unit> &&promise);
|
||||
|
||||
void on_update(tl_object_ptr<telegram_api::updateMessageReactions> update, Promise<Unit> &&promise);
|
||||
|
||||
void on_update(tl_object_ptr<telegram_api::updateFolderPeers> update, Promise<Unit> &&promise);
|
||||
|
||||
void on_update(tl_object_ptr<telegram_api::updateUserTyping> update, Promise<Unit> &&promise);
|
||||
@ -504,8 +506,6 @@ class UpdatesManager final : public Actor {
|
||||
void on_update(tl_object_ptr<telegram_api::updatePendingJoinRequests> update, Promise<Unit> &&promise);
|
||||
|
||||
// unsupported updates
|
||||
|
||||
void on_update(tl_object_ptr<telegram_api::updateMessageReactions> update, Promise<Unit> &&promise);
|
||||
};
|
||||
|
||||
} // namespace td
|
||||
|
Loading…
Reference in New Issue
Block a user