mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Don't crash on bad userId in local storage.
This commit is contained in:
@@ -153,6 +153,12 @@ void Account::createSession(
|
||||
const auto flags = MTPDuser::Flag::f_self | (phone.isEmpty()
|
||||
? MTPDuser::Flag()
|
||||
: MTPDuser::Flag::f_phone);
|
||||
|
||||
using ServerUserIdType = decltype(std::declval<MTPDuser>().vid().v);
|
||||
if (ServerUserIdType(id.bare) <= 0) { // #TODO ids remove
|
||||
return;
|
||||
}
|
||||
|
||||
createSession(
|
||||
MTP_user(
|
||||
MTP_flags(flags),
|
||||
|
Reference in New Issue
Block a user