Add action bar dependencies.
This commit is contained in:
parent
f9dfd502da
commit
83a3190f2f
@ -7,6 +7,7 @@
|
|||||||
#include "td/telegram/DialogActionBar.h"
|
#include "td/telegram/DialogActionBar.h"
|
||||||
|
|
||||||
#include "td/telegram/ChatManager.h"
|
#include "td/telegram/ChatManager.h"
|
||||||
|
#include "td/telegram/Dependencies.h"
|
||||||
#include "td/telegram/Td.h"
|
#include "td/telegram/Td.h"
|
||||||
#include "td/telegram/UserManager.h"
|
#include "td/telegram/UserManager.h"
|
||||||
|
|
||||||
@ -309,6 +310,10 @@ bool DialogActionBar::on_outgoing_message() {
|
|||||||
return true;
|
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) {
|
bool operator==(const unique_ptr<DialogActionBar> &lhs, const unique_ptr<DialogActionBar> &rhs) {
|
||||||
if (lhs == nullptr) {
|
if (lhs == nullptr) {
|
||||||
return rhs == nullptr;
|
return rhs == nullptr;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
|
class Dependencies;
|
||||||
class Td;
|
class Td;
|
||||||
|
|
||||||
class DialogActionBar {
|
class DialogActionBar {
|
||||||
@ -68,6 +69,8 @@ class DialogActionBar {
|
|||||||
|
|
||||||
bool on_outgoing_message();
|
bool on_outgoing_message();
|
||||||
|
|
||||||
|
void add_dependencies(Dependencies &dependencies) const;
|
||||||
|
|
||||||
template <class StorerT>
|
template <class StorerT>
|
||||||
void store(StorerT &storer) const {
|
void store(StorerT &storer) const {
|
||||||
bool has_distance = distance_ >= 0;
|
bool has_distance = distance_ >= 0;
|
||||||
|
@ -35633,6 +35633,9 @@ unique_ptr<MessagesManager::Dialog> MessagesManager::parse_dialog(DialogId dialo
|
|||||||
add_message_dependencies(dependencies, message.get());
|
add_message_dependencies(dependencies, message.get());
|
||||||
});
|
});
|
||||||
add_draft_message_dependencies(dependencies, d->draft_message);
|
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) {
|
for (auto user_id : d->pending_join_request_user_ids) {
|
||||||
dependencies.add(user_id);
|
dependencies.add(user_id);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user