Skip to content

Commit

Permalink
Add source to send_update_new_chat.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed May 7, 2024
1 parent 19533bc commit 0535cba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions td/telegram/MessagesManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28503,15 +28503,15 @@ void MessagesManager::send_update_delete_messages(DialogId dialog_id, vector<int
std::move(message_ids), is_permanent, false));
}

void MessagesManager::send_update_new_chat(Dialog *d) {
void MessagesManager::send_update_new_chat(Dialog *d, const char *source) {
CHECK(d != nullptr);
CHECK(d->messages.empty());
if ((d->dialog_id.get_type() == DialogType::User || d->dialog_id.get_type() == DialogType::SecretChat) &&
td_->auth_manager_->is_bot()) {
(void)td_->dialog_manager_->get_dialog_photo(d->dialog_id); // to apply pending user photo
}
d->is_update_new_chat_being_sent = true;
auto chat_object = get_chat_object(d, "send_update_new_chat");
auto chat_object = get_chat_object(d, source);
bool has_action_bar = chat_object->action_bar_ != nullptr;
bool has_background = chat_object->background_ != nullptr;
bool has_theme = !chat_object->theme_name_.empty();
Expand Down Expand Up @@ -34372,7 +34372,7 @@ MessagesManager::Dialog *MessagesManager::add_new_dialog(unique_ptr<Dialog> &&di
fix_dialog_action_bar(d, d->action_bar.get());
fix_dialog_business_bot_manage_bar(dialog_id, d->business_bot_manage_bar.get());

send_update_new_chat(d);
send_update_new_chat(d, source);

being_added_new_dialog_id_ = DialogId();

Expand Down
2 changes: 1 addition & 1 deletion td/telegram/MessagesManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2339,7 +2339,7 @@ class MessagesManager final : public Actor {

void send_update_delete_messages(DialogId dialog_id, vector<int64> &&message_ids, bool is_permanent) const;

void send_update_new_chat(Dialog *d);
void send_update_new_chat(Dialog *d, const char *source);

bool need_hide_dialog_draft_message(const Dialog *d) const;

Expand Down

0 comments on commit 0535cba

Please sign in to comment.