Add chunks in TimelineVoiceBroadcastDetails

This commit is contained in:
yostyle
2022-10-18 23:36:21 +02:00
parent b63cb3f0dc
commit 21d453b164
8 changed files with 81 additions and 32 deletions
@@ -111,7 +111,7 @@ public class VoiceBroadcastAggregator {
let eventTypes = [VoiceBroadcastSettings.eventType, kMXEventTypeStringRoomMessage]
self.referenceEventsListener = self.room.listen(toEventsOfTypes: eventTypes) { [weak self] event, direction, state in
// TODO: VB check sender id to block fake voice broadcast chunk
// TODO: VB check if the sender id is the same as the user id who's created the voice broadcast to block a fake voice broadcast chunk
guard let self = self,
let relatedEventId = event.relatesTo?.eventId,
relatedEventId == self.voiceBroadcastStartEventId,
@@ -18,17 +18,15 @@ import Foundation
public protocol VoiceBroadcastProtocol {
var chunks: Set<VoiceBroadcastChunk> { get }
var isClosed: Bool { get }
var kind: VoiceBroadcastKind { get }
}
public enum VoiceBroadcastKind {
case disclosed
case undisclosed
case player
case recorder
}
class VoiceBroadcast: VoiceBroadcastProtocol {
var chunks: Set<VoiceBroadcastChunk> = []
var isClosed: Bool = false
var kind: VoiceBroadcastKind = .disclosed
var kind: VoiceBroadcastKind = .player
}