Send voice message should not be allowed during a voice broadcast recording (#7235)

This commit is contained in:
Nicolas Mauri
2023-01-06 17:24:07 +01:00
parent ad66f0fad2
commit bbb13516bf
5 changed files with 33 additions and 0 deletions
+14
View File
@@ -7887,6 +7887,20 @@ static CGSize kThreadListBarButtonItemImageSize;
}];
}
- (BOOL)voiceMessageControllerDidRequestRecording:(VoiceMessageController *)voiceMessageController
{
MXSession* session = self.roomDataSource.mxSession;
// Check whether the user is not already broadcasting here or in another room
if (session.voiceBroadcastService)
{
[self showAlertWithTitle:[VectorL10n voiceMessageBroadcastInProgressTitle] message:[VectorL10n voiceMessageBroadcastInProgressMessage]];
return NO;
}
return YES;
}
- (void)voiceMessageController:(VoiceMessageController *)voiceMessageController
didRequestSendForFileAtURL:(NSURL *)url
duration:(NSUInteger)duration