Invalidate user_full_contact_require_premium_ when contact_require_premium changes.
This commit is contained in:
parent
c95cb5d75c
commit
8c2375fdfe
@ -9247,8 +9247,7 @@ void ContactsManager::on_get_user(tl_object_ptr<telegram_api::User> &&user_ptr,
|
|||||||
can_join_groups != u->can_join_groups || can_read_all_group_messages != u->can_read_all_group_messages ||
|
can_join_groups != u->can_join_groups || can_read_all_group_messages != u->can_read_all_group_messages ||
|
||||||
is_scam != u->is_scam || is_fake != u->is_fake || is_inline_bot != u->is_inline_bot ||
|
is_scam != u->is_scam || is_fake != u->is_fake || is_inline_bot != u->is_inline_bot ||
|
||||||
inline_query_placeholder != u->inline_query_placeholder || need_location_bot != u->need_location_bot ||
|
inline_query_placeholder != u->inline_query_placeholder || need_location_bot != u->need_location_bot ||
|
||||||
can_be_added_to_attach_menu != u->can_be_added_to_attach_menu ||
|
can_be_added_to_attach_menu != u->can_be_added_to_attach_menu) {
|
||||||
contact_require_premium != u->contact_require_premium) {
|
|
||||||
if (is_bot != u->is_bot) {
|
if (is_bot != u->is_bot) {
|
||||||
LOG_IF(ERROR, !is_deleted && !u->is_deleted && u->is_received)
|
LOG_IF(ERROR, !is_deleted && !u->is_deleted && u->is_received)
|
||||||
<< "User.is_bot has changed for " << user_id << "/" << u->usernames << " from " << source << " from "
|
<< "User.is_bot has changed for " << user_id << "/" << u->usernames << " from " << source << " from "
|
||||||
@ -9266,11 +9265,15 @@ void ContactsManager::on_get_user(tl_object_ptr<telegram_api::User> &&user_ptr,
|
|||||||
u->inline_query_placeholder = std::move(inline_query_placeholder);
|
u->inline_query_placeholder = std::move(inline_query_placeholder);
|
||||||
u->need_location_bot = need_location_bot;
|
u->need_location_bot = need_location_bot;
|
||||||
u->can_be_added_to_attach_menu = can_be_added_to_attach_menu;
|
u->can_be_added_to_attach_menu = can_be_added_to_attach_menu;
|
||||||
u->contact_require_premium = contact_require_premium;
|
|
||||||
|
|
||||||
LOG(DEBUG) << "Info has changed for " << user_id;
|
LOG(DEBUG) << "Info has changed for " << user_id;
|
||||||
u->is_changed = true;
|
u->is_changed = true;
|
||||||
}
|
}
|
||||||
|
if (u->contact_require_premium != contact_require_premium) {
|
||||||
|
u->contact_require_premium = contact_require_premium;
|
||||||
|
u->is_changed = true;
|
||||||
|
user_full_contact_require_premium_.erase(user_id);
|
||||||
|
}
|
||||||
if (is_received && attach_menu_enabled != u->attach_menu_enabled) {
|
if (is_received && attach_menu_enabled != u->attach_menu_enabled) {
|
||||||
u->attach_menu_enabled = attach_menu_enabled;
|
u->attach_menu_enabled = attach_menu_enabled;
|
||||||
u->is_changed = true;
|
u->is_changed = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user