Explicitly set promise in on_update_message_reactions.
This commit is contained in:
parent
eecec61fa9
commit
d9fecc6cb0
@ -6823,11 +6823,13 @@ void MessagesManager::on_update_message_reactions(FullMessageId full_message_id,
|
|||||||
auto dialog_id = full_message_id.get_dialog_id();
|
auto dialog_id = full_message_id.get_dialog_id();
|
||||||
if (!have_input_peer(dialog_id, AccessRights::Read)) {
|
if (!have_input_peer(dialog_id, AccessRights::Read)) {
|
||||||
LOG(INFO) << "Ignore updateMessageReaction in inaccessible " << full_message_id;
|
LOG(INFO) << "Ignore updateMessageReaction in inaccessible " << full_message_id;
|
||||||
|
promise.set_value(Unit());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const Dialog *d = get_dialog(dialog_id);
|
const Dialog *d = get_dialog(dialog_id);
|
||||||
if (d == nullptr) {
|
if (d == nullptr) {
|
||||||
LOG(INFO) << "Ignore updateMessageReaction in unknown " << dialog_id;
|
LOG(INFO) << "Ignore updateMessageReaction in unknown " << dialog_id;
|
||||||
|
promise.set_value(Unit());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6836,6 +6838,8 @@ void MessagesManager::on_update_message_reactions(FullMessageId full_message_id,
|
|||||||
// but if there are unread reactions or the chat has unread reactions,
|
// but if there are unread reactions or the chat has unread reactions,
|
||||||
// then number of unread reactions could have been changed, so reload the number of unread reactions
|
// then number of unread reactions could have been changed, so reload the number of unread reactions
|
||||||
send_get_dialog_query(dialog_id, std::move(promise), 0, "on_update_message_reactions");
|
send_get_dialog_query(dialog_id, std::move(promise), 0, "on_update_message_reactions");
|
||||||
|
} else {
|
||||||
|
promise.set_value(Unit());
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user