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

Add forwards and profile photo privacy settings.

This commit is contained in:
John Preston
2019-03-19 14:39:19 +04:00
parent a34e998c42
commit 81862215b4
7 changed files with 160 additions and 5 deletions

View File

@@ -176,6 +176,10 @@ MTPInputPrivacyKey ApiWrap::Privacy::Input(Key key) {
return MTP_inputPrivacyKeyStatusTimestamp();
case Privacy::Key::CallsPeer2Peer:
return MTP_inputPrivacyKeyPhoneP2P();
case Privacy::Key::Forwards:
return MTP_inputPrivacyKeyForwards();
case Privacy::Key::ProfilePhoto:
return MTP_inputPrivacyKeyProfilePhoto();
}
Unexpected("Key in ApiWrap::Privacy::Input.");
}
@@ -2211,6 +2215,10 @@ void ApiWrap::handlePrivacyChange(
case mtpc_inputPrivacyKeyPhoneCall: return Key::Calls;
case mtpc_privacyKeyPhoneP2P:
case mtpc_inputPrivacyKeyPhoneP2P: return Key::CallsPeer2Peer;
case mtpc_privacyKeyForwards:
case mtpc_inputPrivacyKeyForwards: return Key::Forwards;
case mtpc_privacyKeyProfilePhoto:
case mtpc_inputPrivacyKeyProfilePhoto: return Key::ProfilePhoto;
}
return std::nullopt;
}();