Add action bar dependencies.

This commit is contained in:
levlam 2024-04-07 01:59:13 +03:00
parent f9dfd502da
commit 83a3190f2f
3 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#include "td/telegram/DialogActionBar.h"
#include "td/telegram/ChatManager.h"
#include "td/telegram/Dependencies.h"
#include "td/telegram/Td.h"
#include "td/telegram/UserManager.h"
@ -309,6 +310,10 @@ bool DialogActionBar::on_outgoing_message() {
return true;
}
void DialogActionBar::add_dependencies(Dependencies &dependencies) const {
dependencies.add(business_bot_user_id_);
}
bool operator==(const unique_ptr<DialogActionBar> &lhs, const unique_ptr<DialogActionBar> &rhs) {
if (lhs == nullptr) {
return rhs == nullptr;

View File

@ -15,6 +15,7 @@
namespace td {
class Dependencies;
class Td;
class DialogActionBar {
@ -68,6 +69,8 @@ class DialogActionBar {
bool on_outgoing_message();
void add_dependencies(Dependencies &dependencies) const;
template <class StorerT>
void store(StorerT &storer) const {
bool has_distance = distance_ >= 0;

View File

@ -35633,6 +35633,9 @@ unique_ptr<MessagesManager::Dialog> MessagesManager::parse_dialog(DialogId dialo
add_message_dependencies(dependencies, message.get());
});
add_draft_message_dependencies(dependencies, d->draft_message);
if (d->action_bar != nullptr) {
d->action_bar->add_dependencies(dependencies);
}
for (auto user_id : d->pending_join_request_user_ids) {
dependencies.add(user_id);
}