mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Don't crash on bad userId in local storage.
This commit is contained in:
parent
6192413f0b
commit
bdc275a927
1 changed files with 6 additions and 0 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Reference in a new issue