2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Moved user privacy from ApiWrap to Api::UserPrivacy.

This commit is contained in:
23rd
2021-07-31 17:11:53 +03:00
committed by John Preston
parent ac86f3e5bd
commit 5bd73bab9b
13 changed files with 439 additions and 390 deletions

View File

@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "apiwrap.h"
#include "api/api_updates.h"
#include "api/api_send_progress.h"
#include "api/api_user_privacy.h"
#include "main/main_account.h"
#include "main/main_domain.h"
#include "main/main_session_settings.h"
@@ -120,11 +121,11 @@ Session::Session(
}, _lifetime);
if (_settings->hadLegacyCallsPeerToPeerNobody()) {
api().savePrivacy(
MTP_inputPrivacyKeyPhoneP2P(),
QVector<MTPInputPrivacyRule>(
1,
MTP_inputPrivacyValueDisallowAll()));
api().userPrivacy().save(
Api::UserPrivacy::Key::CallsPeer2Peer,
Api::UserPrivacy::Rule{
.option = Api::UserPrivacy::Option::Nobody
});
saveSettingsDelayed();
}