forked from mirrors/linphone-iphone
Fix canAdminEphemeral function in ChatConversationViews so that only encrypted chatrooms can possibly return “true”. Also fix bug causing the wrong row to be called in chatroom popup action menu
This commit is contained in:
parent
33b07703ca
commit
10b28cd6cf
1 changed files with 2 additions and 4 deletions
|
|
@ -426,7 +426,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
if (!room)
|
||||
return true;
|
||||
LinphoneChatRoomCapabilitiesMask capabilities = linphone_chat_room_get_capabilities(room);
|
||||
return capabilities & LinphoneChatRoomCapabilitiesBasic;
|
||||
return capabilities & LinphoneChatRoomCapabilitiesEncrypted;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1747,8 +1747,7 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog
|
|||
}
|
||||
|
||||
-(BOOL) canAdminEphemeral:(const LinphoneChatRoom *)cr {
|
||||
if (!cr) return FALSE;
|
||||
if ([ChatConversationView isBasicChatRoom:_chatRoom]) return FALSE;
|
||||
if (!cr || !isEncrypted) return FALSE;
|
||||
|
||||
// If ephemeral mode is DeviceManaged, then we don't need to check anything else
|
||||
return (linphone_chat_room_params_get_ephemeral_mode(linphone_chat_room_get_current_params(cr)) == LinphoneChatRoomEphemeralModeDeviceManaged)
|
||||
|
|
@ -1771,7 +1770,6 @@ void on_chat_room_conference_alert(LinphoneChatRoom *cr, const LinphoneEventLog
|
|||
|
||||
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[self onToggleMenu:nil];
|
||||
BOOL isEncrypted = ![ChatConversationView isBasicChatRoom:_chatRoom];
|
||||
|
||||
if (indexPath.row == 0) {
|
||||
if (isOneToOne) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue