mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Use special webview storage for tonsite.
This commit is contained in:
@@ -3198,4 +3198,18 @@ bool Account::decrypt(
|
||||
return true;
|
||||
}
|
||||
|
||||
Webview::StorageId TonSiteStorageId() {
|
||||
auto result = Webview::StorageId{
|
||||
.path = BaseGlobalPath() + u"webview-tonsite"_q,
|
||||
.token = Core::App().settings().tonsiteStorageToken(),
|
||||
};
|
||||
if (result.token.isEmpty()) {
|
||||
result.token = QByteArray::fromStdString(
|
||||
Webview::GenerateStorageToken());
|
||||
Core::App().settings().setTonsiteStorageToken(result.token);
|
||||
Core::App().saveSettingsDelayed();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace Storage
|
||||
|
Reference in New Issue
Block a user