Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Sources/StreamVideo/CallState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ public class CallState: ObservableObject {
break
case .typeCallUserFeedbackSubmittedEvent:
break
case .typeCallModerationBlurEvent:
break
case .typeCallModerationWarningEvent:
break
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// Copyright © 2025 Stream.io Inc. All rights reserved.
//

import Foundation

public final class CallModerationBlurEvent: @unchecked Sendable, Event, Codable, JSONEncodable, Hashable, WSCallEvent {
public var callCid: String
public var createdAt: Date
public var custom: [String: RawJSON]
public var type: String = "call.moderation_blur"
public var userId: String

public init(callCid: String, createdAt: Date, custom: [String: RawJSON], userId: String) {
self.callCid = callCid
self.createdAt = createdAt
self.custom = custom
self.userId = userId
}

public enum CodingKeys: String, CodingKey, CaseIterable {
case callCid = "call_cid"
case createdAt = "created_at"
case custom
case type
case userId = "user_id"
}

public static func == (lhs: CallModerationBlurEvent, rhs: CallModerationBlurEvent) -> Bool {
lhs.callCid == rhs.callCid &&
lhs.createdAt == rhs.createdAt &&
lhs.custom == rhs.custom &&
lhs.type == rhs.type &&
lhs.userId == rhs.userId
}

public func hash(into hasher: inout Hasher) {
hasher.combine(callCid)
hasher.combine(createdAt)
hasher.combine(custom)
hasher.combine(type)
hasher.combine(userId)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// Copyright © 2025 Stream.io Inc. All rights reserved.
//

import Foundation

public final class CallModerationWarningEvent: @unchecked Sendable, Event, Codable, JSONEncodable, Hashable, WSCallEvent {
public var callCid: String
public var createdAt: Date
public var custom: [String: RawJSON]
public var message: String
public var type: String = "call.moderation_warning"
public var userId: String

public init(callCid: String, createdAt: Date, custom: [String: RawJSON], message: String, userId: String) {
self.callCid = callCid
self.createdAt = createdAt
self.custom = custom
self.message = message
self.userId = userId
}

public enum CodingKeys: String, CodingKey, CaseIterable {
case callCid = "call_cid"
case createdAt = "created_at"
case custom
case message
case type
case userId = "user_id"
}

public static func == (lhs: CallModerationWarningEvent, rhs: CallModerationWarningEvent) -> Bool {
lhs.callCid == rhs.callCid &&
lhs.createdAt == rhs.createdAt &&
lhs.custom == rhs.custom &&
lhs.message == rhs.message &&
lhs.type == rhs.type &&
lhs.userId == rhs.userId
}

public func hash(into hasher: inout Hasher) {
hasher.combine(callCid)
hasher.combine(createdAt)
hasher.combine(custom)
hasher.combine(message)
hasher.combine(type)
hasher.combine(userId)
}
}
20 changes: 20 additions & 0 deletions Sources/StreamVideo/OpenApi/generated/Models/VideoEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public enum VideoEvent: Codable, Hashable {
case typeCallMemberUpdatedEvent(CallMemberUpdatedEvent)
case typeCallMemberUpdatedPermissionEvent(CallMemberUpdatedPermissionEvent)
case typeCallMissedEvent(CallMissedEvent)
case typeCallModerationBlurEvent(CallModerationBlurEvent)
case typeCallModerationWarningEvent(CallModerationWarningEvent)
case typeCallNotificationEvent(CallNotificationEvent)
case typePermissionRequestEvent(PermissionRequestEvent)
case typeUpdatedCallPermissionsEvent(UpdatedCallPermissionsEvent)
Expand Down Expand Up @@ -120,6 +122,10 @@ public enum VideoEvent: Codable, Hashable {
return value.type
case let .typeCallMissedEvent(value):
return value.type
case let .typeCallModerationBlurEvent(value):
return value.type
case let .typeCallModerationWarningEvent(value):
return value.type
case let .typeCallNotificationEvent(value):
return value.type
case let .typePermissionRequestEvent(value):
Expand Down Expand Up @@ -237,6 +243,10 @@ public enum VideoEvent: Codable, Hashable {
return value
case let .typeCallMissedEvent(value):
return value
case let .typeCallModerationBlurEvent(value):
return value
case let .typeCallModerationWarningEvent(value):
return value
case let .typeCallNotificationEvent(value):
return value
case let .typePermissionRequestEvent(value):
Expand Down Expand Up @@ -355,6 +365,10 @@ public enum VideoEvent: Codable, Hashable {
try container.encode(value)
case let .typeCallMissedEvent(value):
try container.encode(value)
case let .typeCallModerationBlurEvent(value):
try container.encode(value)
case let .typeCallModerationWarningEvent(value):
try container.encode(value)
case let .typeCallNotificationEvent(value):
try container.encode(value)
case let .typePermissionRequestEvent(value):
Expand Down Expand Up @@ -497,6 +511,12 @@ public enum VideoEvent: Codable, Hashable {
} else if dto.type == "call.missed" {
let value = try container.decode(CallMissedEvent.self)
self = .typeCallMissedEvent(value)
} else if dto.type == "call.moderation_blur" {
let value = try container.decode(CallModerationBlurEvent.self)
self = .typeCallModerationBlurEvent(value)
} else if dto.type == "call.moderation_warning" {
let value = try container.decode(CallModerationWarningEvent.self)
self = .typeCallModerationWarningEvent(value)
} else if dto.type == "call.notification" {
let value = try container.decode(CallNotificationEvent.self)
self = .typeCallNotificationEvent(value)
Expand Down
8 changes: 8 additions & 0 deletions StreamVideo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,8 @@
845C09952C10A7D700F725B3 /* SessionTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 845C09902C0E0B7600F725B3 /* SessionTimer.swift */; };
845C09972C11AAA200F725B3 /* RejectCallRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 845C09962C11AAA100F725B3 /* RejectCallRequest.swift */; };
845E31062A7121D6004DC470 /* BroadcastObserver_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 845E31052A7121D6004DC470 /* BroadcastObserver_Tests.swift */; };
8464FBA92EB3832000933768 /* CallModerationBlurEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8464FBA72EB3832000933768 /* CallModerationBlurEvent.swift */; };
8464FBAA2EB3832000933768 /* CallModerationWarningEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8464FBA82EB3832000933768 /* CallModerationWarningEvent.swift */; };
8468821328DFA448003BA9EE /* UnsecureRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8468821228DFA448003BA9EE /* UnsecureRepository.swift */; };
8469593229BB3D7500134EA0 /* SignalServer_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8469593129BB3D7500134EA0 /* SignalServer_Tests.swift */; };
8469593429BB5CE200134EA0 /* HTTPConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8469593329BB5CE200134EA0 /* HTTPConfig.swift */; };
Expand Down Expand Up @@ -2884,6 +2886,8 @@
845C09922C0E1BF900F725B3 /* DemoSessionTimerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoSessionTimerView.swift; sourceTree = "<group>"; };
845C09962C11AAA100F725B3 /* RejectCallRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RejectCallRequest.swift; sourceTree = "<group>"; };
845E31052A7121D6004DC470 /* BroadcastObserver_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BroadcastObserver_Tests.swift; sourceTree = "<group>"; };
8464FBA72EB3832000933768 /* CallModerationBlurEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallModerationBlurEvent.swift; sourceTree = "<group>"; };
8464FBA82EB3832000933768 /* CallModerationWarningEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallModerationWarningEvent.swift; sourceTree = "<group>"; };
8468821228DFA448003BA9EE /* UnsecureRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnsecureRepository.swift; sourceTree = "<group>"; };
8469593129BB3D7500134EA0 /* SignalServer_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignalServer_Tests.swift; sourceTree = "<group>"; };
8469593329BB5CE200134EA0 /* HTTPConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPConfig.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -7164,6 +7168,8 @@
84DC383E29ADFCFC00946713 /* Models */ = {
isa = PBXGroup;
children = (
8464FBA72EB3832000933768 /* CallModerationBlurEvent.swift */,
8464FBA82EB3832000933768 /* CallModerationWarningEvent.swift */,
8438AB042E5F3A2900BA834F /* AppEventResponse.swift */,
8438AB052E5F3A2900BA834F /* FileUploadConfig.swift */,
84DD68F22E5F24A9001A1DF5 /* AppUpdatedEvent.swift */,
Expand Down Expand Up @@ -8444,6 +8450,8 @@
8478EB13288A054B00525538 /* VideoConfig.swift in Sources */,
841BAA372BD15CDE000C73E4 /* Coordinates.swift in Sources */,
8492B875290808AE00006649 /* StreamVideoEnvironment.swift in Sources */,
8464FBA92EB3832000933768 /* CallModerationBlurEvent.swift in Sources */,
8464FBAA2EB3832000933768 /* CallModerationWarningEvent.swift in Sources */,
841BAA492BD15CDE000C73E4 /* CollectUserFeedbackRequest.swift in Sources */,
406583902B877A0500B4F979 /* ImageBackgroundVideoFilter.swift in Sources */,
8454A3192AAB374B00A012C6 /* CallStatsReport.swift in Sources */,
Expand Down