Add “only_secure_chatrooms” parameter to rc. When set to “1”, only encrypted chatrooms can be created

This commit is contained in:
QuentinArguillere 2022-09-27 17:21:16 +02:00
parent 4c75c4222d
commit b4103d2f4f
2 changed files with 12 additions and 6 deletions

View file

@ -85,6 +85,11 @@ static UICompositeViewDescription *compositeDescription = nil;
_allButton.frame = frame;
}
if ([LinphoneManager.instance lpConfigBoolForKey:@"only_secure_chatrooms"]) {
_chiffreOptionView.hidden = true;
_isEncrypted = true;
_tableController.isEncrypted = true;
}
if (_isForVoipConference) {
_switchView.hidden = true;
@ -116,14 +121,14 @@ static UICompositeViewDescription *compositeDescription = nil;
frame.origin.x = self.view.frame.size.width * 0.192;
}
_chiffreOptionView.frame = frame;
_isEncrypted = FALSE;
_isEncrypted = [LinphoneManager.instance lpConfigBoolForKey:@"only_secure_chatrooms"]; // false by default
CGRect buttonFrame = _chiffreButton.frame;
_tableController.isEncrypted = _isEncrypted;
// no encrypted by default
buttonFrame.origin.x = 2;
[_chiffreImage setImage:[UIImage imageNamed:@"security_toogle_background_grey.png"]];
_chiffreButton.frame = buttonFrame;
if (!_isEncrypted) {
buttonFrame.origin.x = 2;
[_chiffreImage setImage:[UIImage imageNamed:@"security_toogle_background_grey.png"]];
_chiffreButton.frame = buttonFrame;
}
_waitView.hidden = YES;
_backButton.hidden = IPAD;

View file

@ -27,6 +27,7 @@ use_callkit=1
accept_early_media=0
only_secure_chatrooms=0
fetch_native_contacts=1
[sip]