2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Don't logout on some server-side problems.

This commit is contained in:
John Preston
2018-05-13 11:42:25 +03:00
parent 7d8ba15252
commit 8764da787b
3 changed files with 36 additions and 17 deletions

View File

@@ -3717,8 +3717,11 @@ void MainWidget::start(const MTPUser *self) {
if (!self) {
MTP::send(MTPusers_GetFullUser(MTP_inputUserSelf()), rpcDone(&MainWidget::startWithSelf));
return;
}
if (!Auth().validateSelf(*self)) {
} else if (!Auth().validateSelf(*self)) {
constexpr auto kRequestUserAgainTimeout = TimeMs(10000);
App::CallDelayed(kRequestUserAgainTimeout, this, [=] {
MTP::send(MTPusers_GetFullUser(MTP_inputUserSelf()), rpcDone(&MainWidget::startWithSelf));
});
return;
}