Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: CallKit now displays appropriate video and audio call labels. #709

Merged
merged 4 commits into from
Jul 23, 2024
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
2 changes: 2 additions & 0 deletions packages/stream_video/lib/src/stream_video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ class StreamVideo extends Disposable {

final createdById = payload['created_by_id'] as String?;
final createdByName = payload['created_by_display_name'] as String?;
final hasVideo = payload['video'] as String?;

final type = payload['type'] as String?;
if (type == 'call.missed') {
Expand Down Expand Up @@ -644,6 +645,7 @@ class StreamVideo extends Disposable {
handle: createdById,
nameCaller: createdByName,
callCid: callCid,
hasVideo: hasVideo != 'false',
),
);
return true;
Expand Down
6 changes: 6 additions & 0 deletions packages/stream_video_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Upcoming

✅ Added

- CallKit now displays appropriate video and audio call labels.

## 0.4.2

✅ Added
Expand Down
6 changes: 6 additions & 0 deletions packages/stream_video_push_notification/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Upcoming

✅ Added

- CallKit now displays appropriate video and audio call labels.

## 0.4.2
* Sync version with `stream_video_flutter` 0.4.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ public class StreamVideoPKDelegateManager: NSObject, PKPushRegistryDelegate, UNU
let callCid = streamDict?["call_cid"] as? String ?? ""
let createdByName = streamDict?["created_by_display_name"] as? String
let createdById = streamDict?["created_by_id"] as? String
let videoIncluded = streamDict?["video"] as? String
let videoData = videoIncluded == "false" ? 0 : 1

var callUUID = UUID().uuidString;

Expand All @@ -118,7 +120,7 @@ public class StreamVideoPKDelegateManager: NSObject, PKPushRegistryDelegate, UNU
data.callKitData.uuid = callUUID
data.callKitData.nameCaller = createdByName ?? defaultCallText
data.callKitData.handle = createdById ?? defaultCallText
data.callKitData.type = 1 //video
data.callKitData.type = videoData
data.callKitData.extra = ["callCid": callCid]

// Show call incoming notification.
Expand Down
Loading