Always end call for everyone in 1-to-1 conversations.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Ivan Sein 2024-04-19 18:28:33 +02:00
Родитель f17425cd14
Коммит 29a7dfedc0
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -455,7 +455,7 @@ typedef void (^UpdateCallParticipantViewCellBlock)(CallParticipantViewCell *cell
return;
}
[self hangupForAll:NO];
[self hangupForAll:_room.type == kNCRoomTypeOneToOne];
}
- (void)providerWantsToUpgradeToVideoCall:(NSNotification *)notification
@ -881,8 +881,7 @@ typedef void (^UpdateCallParticipantViewCellBlock)(CallParticipantViewCell *cell
[self adjustMoreButtonMenu];
if (([self->_room canModerate] || self->_room.type == kNCRoomTypeOneToOne) &&
[[NCDatabaseManager sharedInstance] serverHasTalkCapability:kCapabilityPublishingPermissions]) {
if ([self->_room canModerate] && [[NCDatabaseManager sharedInstance] serverHasTalkCapability:kCapabilityPublishingPermissions]) {
__weak typeof(self) weakSelf = self;
UIAction *hangupForAllAction = [UIAction actionWithTitle:NSLocalizedString(@"End call for everyone", @"") image:[UIImage systemImageNamed:@"phone.down.fill"] identifier:nil handler:^(UIAction *action) {
[weakSelf hangupForAll:YES];
@ -1490,7 +1489,7 @@ typedef void (^UpdateCallParticipantViewCellBlock)(CallParticipantViewCell *cell
- (IBAction)hangupButtonPressed:(id)sender
{
[self hangupForAll:NO];
[self hangupForAll:_room.type == kNCRoomTypeOneToOne];
}
- (void)hangupForAll:(BOOL)allParticipants