Transition voice messages to the new in thread sending mechanism

This commit is contained in:
Stefan Ceriu
2025-07-22 10:41:30 +03:00
committed by Stefan Ceriu
parent ed98f64a35
commit 3fcbc8c60a
8 changed files with 76 additions and 69 deletions
@@ -144,9 +144,8 @@ class VoiceMessageRecorder: VoiceMessageRecorderProtocol {
return .success(waveformData)
}
func sendVoiceMessage(inRoom roomProxy: JoinedRoomProxyProtocol,
audioConverter: AudioConverterProtocol,
threadRootEventID: String?) async -> Result<Void, VoiceMessageRecorderError> {
func sendVoiceMessage(timelineController: TimelineControllerProtocol,
audioConverter: AudioConverterProtocol) async -> Result<Void, VoiceMessageRecorderError> {
guard let url = audioRecorder.audioFileURL else {
return .failure(VoiceMessageRecorderError.missingRecordingFile)
}
@@ -178,9 +177,9 @@ class VoiceMessageRecorder: VoiceMessageRecorderProtocol {
return .failure(.failedSendingVoiceMessage)
}
let result = await roomProxy.timeline.sendVoiceMessage(url: oggFile,
let result = await timelineController.sendVoiceMessage(url: oggFile,
audioInfo: audioInfo,
waveform: waveform) { _ in }
waveform: waveform)
if case .failure(let error) = result {
MXLog.error("Failed to send the voice message. \(error)")