Remove unused user_id parameters from on_update_user_*.
This commit is contained in:
parent
c4f8f04482
commit
67a418a330
@ -381,7 +381,7 @@ class UpdateBusinessLocationQuery final : public Td::ResultHandler {
|
|||||||
return on_error(result_ptr.move_as_error());
|
return on_error(result_ptr.move_as_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
td_->user_manager_->on_update_user_location(td_->user_manager_->get_my_id(), std::move(location_));
|
td_->user_manager_->on_update_my_user_location(std::move(location_));
|
||||||
|
|
||||||
promise_.set_value(Unit());
|
promise_.set_value(Unit());
|
||||||
}
|
}
|
||||||
@ -415,7 +415,7 @@ class UpdateBusinessWorkHoursQuery final : public Td::ResultHandler {
|
|||||||
return on_error(result_ptr.move_as_error());
|
return on_error(result_ptr.move_as_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
td_->user_manager_->on_update_user_work_hours(td_->user_manager_->get_my_id(), std::move(work_hours_));
|
td_->user_manager_->on_update_my_user_work_hours(std::move(work_hours_));
|
||||||
|
|
||||||
promise_.set_value(Unit());
|
promise_.set_value(Unit());
|
||||||
}
|
}
|
||||||
@ -450,7 +450,7 @@ class UpdateBusinessGreetingMessageQuery final : public Td::ResultHandler {
|
|||||||
return on_error(result_ptr.move_as_error());
|
return on_error(result_ptr.move_as_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
td_->user_manager_->on_update_user_greeting_message(td_->user_manager_->get_my_id(), std::move(greeting_message_));
|
td_->user_manager_->on_update_my_user_greeting_message(std::move(greeting_message_));
|
||||||
|
|
||||||
promise_.set_value(Unit());
|
promise_.set_value(Unit());
|
||||||
}
|
}
|
||||||
@ -485,7 +485,7 @@ class UpdateBusinessAwayMessageQuery final : public Td::ResultHandler {
|
|||||||
return on_error(result_ptr.move_as_error());
|
return on_error(result_ptr.move_as_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
td_->user_manager_->on_update_user_away_message(td_->user_manager_->get_my_id(), std::move(away_message_));
|
td_->user_manager_->on_update_my_user_away_message(std::move(away_message_));
|
||||||
|
|
||||||
promise_.set_value(Unit());
|
promise_.set_value(Unit());
|
||||||
}
|
}
|
||||||
@ -520,7 +520,7 @@ class UpdateBusinessIntroQuery final : public Td::ResultHandler {
|
|||||||
return on_error(result_ptr.move_as_error());
|
return on_error(result_ptr.move_as_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
td_->user_manager_->on_update_user_intro(td_->user_manager_->get_my_id(), std::move(intro_));
|
td_->user_manager_->on_update_my_user_intro(std::move(intro_));
|
||||||
|
|
||||||
promise_.set_value(Unit());
|
promise_.set_value(Unit());
|
||||||
}
|
}
|
||||||
|
@ -3277,13 +3277,8 @@ void UserManager::on_update_user_full_common_chat_count(UserFull *user_full, Use
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserManager::on_update_user_location(UserId user_id, DialogLocation &&location) {
|
void UserManager::on_update_my_user_location(DialogLocation &&location) {
|
||||||
LOG(INFO) << "Receive " << location << " for " << user_id;
|
auto user_id = get_my_id();
|
||||||
if (!user_id.is_valid()) {
|
|
||||||
LOG(ERROR) << "Receive invalid " << user_id;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
UserFull *user_full = get_user_full_force(user_id, "on_update_user_location");
|
UserFull *user_full = get_user_full_force(user_id, "on_update_user_location");
|
||||||
if (user_full == nullptr) {
|
if (user_full == nullptr) {
|
||||||
return;
|
return;
|
||||||
@ -3299,13 +3294,8 @@ void UserManager::on_update_user_full_location(UserFull *user_full, UserId user_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserManager::on_update_user_work_hours(UserId user_id, BusinessWorkHours &&work_hours) {
|
void UserManager::on_update_my_user_work_hours(BusinessWorkHours &&work_hours) {
|
||||||
LOG(INFO) << "Receive " << work_hours << " for " << user_id;
|
auto user_id = get_my_id();
|
||||||
if (!user_id.is_valid()) {
|
|
||||||
LOG(ERROR) << "Receive invalid " << user_id;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
UserFull *user_full = get_user_full_force(user_id, "on_update_user_work_hours");
|
UserFull *user_full = get_user_full_force(user_id, "on_update_user_work_hours");
|
||||||
if (user_full == nullptr) {
|
if (user_full == nullptr) {
|
||||||
return;
|
return;
|
||||||
@ -3321,13 +3311,8 @@ void UserManager::on_update_user_full_work_hours(UserFull *user_full, UserId use
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserManager::on_update_user_away_message(UserId user_id, BusinessAwayMessage &&away_message) {
|
void UserManager::on_update_my_user_away_message(BusinessAwayMessage &&away_message) {
|
||||||
LOG(INFO) << "Receive " << away_message << " for " << user_id;
|
auto user_id = get_my_id();
|
||||||
if (!user_id.is_valid()) {
|
|
||||||
LOG(ERROR) << "Receive invalid " << user_id;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
UserFull *user_full = get_user_full_force(user_id, "on_update_user_away_message");
|
UserFull *user_full = get_user_full_force(user_id, "on_update_user_away_message");
|
||||||
if (user_full == nullptr) {
|
if (user_full == nullptr) {
|
||||||
return;
|
return;
|
||||||
@ -3348,13 +3333,8 @@ void UserManager::on_update_user_full_away_message(UserFull *user_full, UserId u
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserManager::on_update_user_greeting_message(UserId user_id, BusinessGreetingMessage &&greeting_message) {
|
void UserManager::on_update_my_user_greeting_message(BusinessGreetingMessage &&greeting_message) {
|
||||||
LOG(INFO) << "Receive " << greeting_message << " for " << user_id;
|
auto user_id = get_my_id();
|
||||||
if (!user_id.is_valid()) {
|
|
||||||
LOG(ERROR) << "Receive invalid " << user_id;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
UserFull *user_full = get_user_full_force(user_id, "on_update_user_greeting_message");
|
UserFull *user_full = get_user_full_force(user_id, "on_update_user_greeting_message");
|
||||||
if (user_full == nullptr) {
|
if (user_full == nullptr) {
|
||||||
return;
|
return;
|
||||||
@ -3375,13 +3355,8 @@ void UserManager::on_update_user_full_greeting_message(UserFull *user_full, User
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserManager::on_update_user_intro(UserId user_id, BusinessIntro &&intro) {
|
void UserManager::on_update_my_user_intro(BusinessIntro &&intro) {
|
||||||
LOG(INFO) << "Receive " << intro << " for " << user_id;
|
auto user_id = get_my_id();
|
||||||
if (!user_id.is_valid()) {
|
|
||||||
LOG(ERROR) << "Receive invalid " << user_id;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
UserFull *user_full = get_user_full_force(user_id, "on_update_user_intro");
|
UserFull *user_full = get_user_full_force(user_id, "on_update_user_intro");
|
||||||
if (user_full == nullptr) {
|
if (user_full == nullptr) {
|
||||||
return;
|
return;
|
||||||
|
@ -138,15 +138,15 @@ class UserManager final : public Actor {
|
|||||||
|
|
||||||
void on_update_user_common_chat_count(UserId user_id, int32 common_chat_count);
|
void on_update_user_common_chat_count(UserId user_id, int32 common_chat_count);
|
||||||
|
|
||||||
void on_update_user_location(UserId user_id, DialogLocation &&location);
|
void on_update_my_user_location(DialogLocation &&location);
|
||||||
|
|
||||||
void on_update_user_work_hours(UserId user_id, BusinessWorkHours &&work_hours);
|
void on_update_my_user_work_hours(BusinessWorkHours &&work_hours);
|
||||||
|
|
||||||
void on_update_user_away_message(UserId user_id, BusinessAwayMessage &&away_message);
|
void on_update_my_user_away_message(BusinessAwayMessage &&away_message);
|
||||||
|
|
||||||
void on_update_user_greeting_message(UserId user_id, BusinessGreetingMessage &&greeting_message);
|
void on_update_my_user_greeting_message(BusinessGreetingMessage &&greeting_message);
|
||||||
|
|
||||||
void on_update_user_intro(UserId user_id, BusinessIntro &&intro);
|
void on_update_my_user_intro(BusinessIntro &&intro);
|
||||||
|
|
||||||
void on_update_user_commands(UserId user_id,
|
void on_update_user_commands(UserId user_id,
|
||||||
vector<telegram_api::object_ptr<telegram_api::botCommand>> &&bot_commands);
|
vector<telegram_api::object_ptr<telegram_api::botCommand>> &&bot_commands);
|
||||||
|
Loading…
Reference in New Issue
Block a user