Skip to content

Commit e5bd154

Browse files
authored
[Enhancement]Expose custom data on IncomingCall (#766)
1 parent 0d71c60 commit e5bd154

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77
### ✅ Added
88
- Countdown timer and waiting participants info to the livestream player [#754](https://github.com/GetStream/stream-video-swift/pull/754)
99
- EventPublisher for `Call` objects. [#759](https://github.com/GetStream/stream-video-swift/pull/759)
10+
- You can now access the `custom-data` attached on a Call object you received as incoming. [#766](https://github.com/GetStream/stream-video-swift/pull/766)
1011

1112
### 🔄 Changed
1213
- Updated WebRTC version to 125.6422.070 [#760](https://github.com/GetStream/stream-video-swift/pull/760)

Sources/StreamVideoSwiftUI/Models/CallEventsHandler.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public class CallEventsHandler {
5656
type: type,
5757
members: members,
5858
timeout: TimeInterval(ringEvent.call.settings.ring.autoCancelTimeoutMs / 1000),
59-
video: ringEvent.video
59+
video: ringEvent.video,
60+
custom: ringEvent.call.custom
6061
)
6162
return .incoming(incomingCall)
6263
case let .typeCallSessionStartedEvent(callSessionStartedEvent):

Sources/StreamVideoSwiftUI/Models/IncomingCall.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,23 @@ public struct IncomingCall: Identifiable, Sendable, Equatable {
1818
public let members: [Member]
1919
public let timeout: TimeInterval
2020
public let video: Bool
21+
public let custom: [String: RawJSON]
2122

2223
public init(
2324
id: String,
2425
caller: User,
2526
type: String,
2627
members: [Member],
2728
timeout: TimeInterval,
28-
video: Bool = false
29+
video: Bool = false,
30+
custom: [String: RawJSON] = [:]
2931
) {
3032
self.id = id
3133
self.caller = caller
3234
self.type = type
3335
self.members = members
3436
self.timeout = timeout
3537
self.video = video
38+
self.custom = custom
3639
}
3740
}

0 commit comments

Comments
 (0)