Avoid unnecessary send state request (#6970)

This commit is contained in:
Yoan Pintas
2022-10-25 16:51:03 +02:00
committed by GitHub
parent 88f1246277
commit ef50beda68
2 changed files with 9 additions and 3 deletions
@@ -98,9 +98,10 @@ class VoiceBroadcastRecorderService: VoiceBroadcastRecorderServiceProtocol {
guard let self = self else { return }
// Send current chunk
self.sendChunkFile(at: self.chunkFile.url, sequence: self.chunkFileNumber)
self.chunkFile = nil
if self.chunkFile != nil {
self.sendChunkFile(at: self.chunkFile.url, sequence: self.chunkFileNumber)
self.chunkFile = nil
}
}, failure: { error in
MXLog.error("[VoiceBroadcastRecorderService] Failed to pause voice broadcast", context: error)
})