Don't allow to change my_id.

This commit is contained in:
levlam 2024-03-22 16:23:31 +03:00
parent be197d6ec3
commit 8bf00d067f

View File

@ -5083,6 +5083,7 @@ void ContactsManager::set_my_id(UserId my_id) {
UserId my_old_id = my_id_;
if (my_old_id.is_valid() && my_old_id != my_id) {
LOG(ERROR) << "Already know that me is " << my_old_id << " but received userSelf with " << my_id;
return;
}
if (!my_id.is_valid()) {
LOG(ERROR) << "Receive invalid my ID " << my_id;