Add MessageReactions::add_min_channels.
This commit is contained in:
parent
375446ac88
commit
798f4fdb2f
|
@ -805,6 +805,15 @@ vector<td_api::object_ptr<td_api::messageReaction>> MessageReactions::get_messag
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MessageReactions::add_min_channels(Td *td) const {
|
||||||
|
for (const auto &reaction : reactions_) {
|
||||||
|
for (const auto &recent_chooser_min_channel : reaction.get_recent_chooser_min_channels()) {
|
||||||
|
LOG(INFO) << "Add min reacted " << recent_chooser_min_channel.first;
|
||||||
|
td->contacts_manager_->add_min_channel(recent_chooser_min_channel.first, recent_chooser_min_channel.second);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MessageReactions::add_dependencies(Dependencies &dependencies) const {
|
void MessageReactions::add_dependencies(Dependencies &dependencies) const {
|
||||||
for (const auto &reaction : reactions_) {
|
for (const auto &reaction : reactions_) {
|
||||||
const auto &dialog_ids = reaction.get_recent_chooser_dialog_ids();
|
const auto &dialog_ids = reaction.get_recent_chooser_dialog_ids();
|
||||||
|
|
|
@ -175,6 +175,8 @@ struct MessageReactions {
|
||||||
vector<td_api::object_ptr<td_api::messageReaction>> get_message_reactions_object(Td *td, UserId my_user_id,
|
vector<td_api::object_ptr<td_api::messageReaction>> get_message_reactions_object(Td *td, UserId my_user_id,
|
||||||
UserId peer_user_id) const;
|
UserId peer_user_id) const;
|
||||||
|
|
||||||
|
void add_min_channels(Td *td) const;
|
||||||
|
|
||||||
void add_dependencies(Dependencies &dependencies) const;
|
void add_dependencies(Dependencies &dependencies) const;
|
||||||
|
|
||||||
static bool need_update_message_reactions(const MessageReactions *old_reactions,
|
static bool need_update_message_reactions(const MessageReactions *old_reactions,
|
||||||
|
|
|
@ -25500,12 +25500,7 @@ void MessagesManager::add_message_dependencies(Dependencies &dependencies, const
|
||||||
dependencies.add_dialog_dependencies(recent_replier_dialog_id);
|
dependencies.add_dialog_dependencies(recent_replier_dialog_id);
|
||||||
}
|
}
|
||||||
if (m->reactions != nullptr) {
|
if (m->reactions != nullptr) {
|
||||||
for (const auto &reaction : m->reactions->reactions_) {
|
m->reactions->add_min_channels(td_);
|
||||||
for (const auto &recent_chooser_min_channel : reaction.get_recent_chooser_min_channels()) {
|
|
||||||
LOG(INFO) << "Add min reacted " << recent_chooser_min_channel.first;
|
|
||||||
td_->contacts_manager_->add_min_channel(recent_chooser_min_channel.first, recent_chooser_min_channel.second);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m->reactions->add_dependencies(dependencies);
|
m->reactions->add_dependencies(dependencies);
|
||||||
}
|
}
|
||||||
add_message_content_dependencies(dependencies, m->content.get());
|
add_message_content_dependencies(dependencies, m->content.get());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user