Skip to content

Commit bef1fe8

Browse files
authored
[Fix]Add team to the CallViewModel and CallViewController (#817)
1 parent f7b7a4e commit bef1fe8

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
### ✅ Added
88
- `CallViewController` was updated to accept the `video` flag when starting a call. [#811](https://github.com/GetStream/stream-video-swift/pull/811)
9+
- `team` property when creating calls through `CallViewModel` and/or `CallViewController` [#817](https://github.com/GetStream/stream-video-swift/pull/817)
910

1011
### 🐞 Fixed
1112
- Fix a retain cycle that was causing StreamVideo to leak in projects using NoiseCancellation. [#814](https://github.com/GetStream/stream-video-swift/pull/814)

Sources/StreamVideoSwiftUI/CallViewModel.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ open class CallViewModel: ObservableObject {
335335
callType: String,
336336
callId: String,
337337
members: [Member],
338+
team: String? = nil,
338339
ring: Bool = false,
339340
maxDuration: Int? = nil,
340341
maxParticipants: Int? = nil,
@@ -353,6 +354,7 @@ open class CallViewModel: ObservableObject {
353354
callType: callType,
354355
callId: callId,
355356
members: membersRequest ?? [],
357+
team: team,
356358
ring: ring,
357359
maxDuration: maxDuration,
358360
maxParticipants: maxParticipants,
@@ -372,6 +374,7 @@ open class CallViewModel: ObservableObject {
372374
let callData = try await call.create(
373375
members: membersRequest,
374376
custom: customData,
377+
team: team,
375378
ring: ring,
376379
maxDuration: maxDuration,
377380
maxParticipants: maxParticipants,
@@ -636,6 +639,7 @@ open class CallViewModel: ObservableObject {
636639
callType: String,
637640
callId: String,
638641
members: [MemberRequest],
642+
team: String? = nil,
639643
ring: Bool = false,
640644
maxDuration: Int? = nil,
641645
maxParticipants: Int? = nil,
@@ -664,7 +668,8 @@ open class CallViewModel: ObservableObject {
664668
members: members,
665669
custom: customData,
666670
settings: settingsRequest,
667-
startsAt: startsAt
671+
startsAt: startsAt,
672+
team: team
668673
)
669674
let settings = localCallSettingsChange ? callSettings : nil
670675

Sources/StreamVideoUIKit/CallViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ open class CallViewController: UIViewController {
5858
callType: String,
5959
callId: String,
6060
members: [Member],
61+
team: String? = nil,
6162
ring: Bool = false,
6263
video: Bool? = nil
6364
) {
6465
viewModel.startCall(
6566
callType: callType,
6667
callId: callId,
6768
members: members,
69+
team: team,
6870
ring: ring,
6971
video: video
7072
)

0 commit comments

Comments
 (0)