forked from mirrors/linphone-iphone
Hide non secure contacts when creating chatroom and lime is forced
This commit is contained in:
parent
b82f8bb84e
commit
0913df3ac8
2 changed files with 13 additions and 0 deletions
|
|
@ -97,6 +97,13 @@
|
|||
_loadingView.hidden = TRUE;
|
||||
}
|
||||
|
||||
-(BOOL) isSecureChatable:(const LinphoneFriend*)friend {
|
||||
if (!friend)
|
||||
return false;
|
||||
const LinphonePresenceModel *model = linphone_friend_get_presence_model(friend);
|
||||
return model && linphone_presence_model_has_capability(model, LinphoneFriendCapabilityLimeX3dh);
|
||||
}
|
||||
|
||||
- (void) buildChatContactTable {
|
||||
|
||||
bctbx_list_t *result_list = [MagicSearchSingleton.instance getLastSearchResults];
|
||||
|
|
@ -109,6 +116,10 @@
|
|||
const LinphoneFriend* friend = linphone_search_result_get_friend(result);
|
||||
const char *phoneNumber = linphone_search_result_get_phone_number(result);
|
||||
|
||||
if ([LinphoneManager.instance lpConfigBoolForKey:@"force_lime_chat_rooms"] && ![self isSecureChatable:friend]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Contact *contact = nil;
|
||||
char *uri = nil;
|
||||
NSString *address = nil;
|
||||
|
|
|
|||
|
|
@ -110,6 +110,8 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
_isEncrypted = true;
|
||||
_tableController.isEncrypted = true;
|
||||
_allButton.hidden = true;
|
||||
_linphoneButton.hidden = true;
|
||||
_selectedButtonImage.hidden = true;
|
||||
}
|
||||
|
||||
if (_isForVoipConference) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue