mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Always write MTP data right after login.
Also write to DebugLogs all keys write attempts.
This commit is contained in:
parent
50586eb06d
commit
81375a05f1
2 changed files with 5 additions and 2 deletions
|
@ -424,7 +424,7 @@ void Widget::Step::finish(const MTPUser &user, QImage photo) {
|
|||
}
|
||||
|
||||
Messenger::Instance().authSessionCreate(user.c_user().vid.v);
|
||||
|
||||
Local::writeMtpData();
|
||||
App::wnd()->setupMain(&user);
|
||||
|
||||
// "this" is already deleted here by creating the main widget.
|
||||
|
|
|
@ -195,9 +195,12 @@ QByteArray Messenger::serializeMtpAuthorization() const {
|
|||
QDataStream stream(&buffer);
|
||||
stream.setVersion(QDataStream::Qt_5_1);
|
||||
|
||||
stream << qint32(AuthSession::Exists() ? AuthSession::CurrentUserId() : 0) << qint32(mainDcId);
|
||||
auto currentUserId = AuthSession::Exists() ? AuthSession::CurrentUserId() : 0;
|
||||
stream << qint32(currentUserId) << qint32(mainDcId);
|
||||
writeKeys(stream, keys);
|
||||
writeKeys(stream, keysToDestroy);
|
||||
|
||||
DEBUG_LOG(("MTP Info: Keys written, userId: %1, dcId: %2").arg(currentUserId).arg(mainDcId));
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue