Skip to content

Commit e29ac6d

Browse files
committed
contactIdentifier added to startCall action.
1 parent 9c9f128 commit e29ac6d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ export default class RNCallKit {
7171
_RNCallKit.displayIncomingCall(uuid, handle, handleType, hasVideo, localizedCallerName);
7272
}
7373

74-
static startCall(uuid, handle, handleType = 'number', hasVideo = false) {
74+
static startCall(uuid, handle, handleType = 'number', hasVideo = false, contactIdentifier?: String) {
7575
if (Platform.OS !== 'ios') return;
76-
_RNCallKit.startCall(uuid, handle, handleType, hasVideo);
76+
_RNCallKit.startCall(uuid, handle, handleType, hasVideo, contactIdentifier);
7777
}
7878

7979
static reportConnectedOutgoingCallWithUUID(uuid) {

ios/RNCallKit/RNCallKit.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@ - (void)dealloc
114114
}
115115

116116
RCT_EXPORT_METHOD(startCall:(NSString *)uuidString
117-
handle:(NSString *)handle
118-
handleType:(NSString *)handleType
119-
video:(BOOL)video)
117+
handle:(NSString *)handle
118+
handleType:(NSString *)handleType
119+
video:(BOOL)video
120+
contactIdentifier:(NSString * _Nullable)contactIdentifier)
120121
{
121122
#ifdef DEBUG
122123
NSLog(@"[RNCallKit][startCall] uuidString = %@", uuidString);
@@ -126,6 +127,7 @@ - (void)dealloc
126127
CXHandle *callHandle = [[CXHandle alloc] initWithType:_handleType value:handle];
127128
CXStartCallAction *startCallAction = [[CXStartCallAction alloc] initWithCallUUID:uuid handle:callHandle];
128129
[startCallAction setVideo:video];
130+
[startCallAction setContactIdentifier:contactIdentifier];
129131

130132
CXTransaction *transaction = [[CXTransaction alloc] initWithAction:startCallAction];
131133

0 commit comments

Comments
 (0)