Skip to content

Commit d91c841

Browse files
dakenffabriziomoscon
authored andcommitted
Moved CallerName to a constant
1 parent f71a67b commit d91c841

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ios/RNTwilioVoice/RNTwilioVoice.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@import TwilioVoice;
1212

1313
NSString * const kCachedDeviceToken = @"CachedDeviceToken";
14+
NSString * const kCallerNameCustomParameter = @"CallerName";
1415

1516
@interface RNTwilioVoice () <PKPushRegistryDelegate, TVONotificationDelegate, TVOCallDelegate, CXProviderDelegate>
1617

@@ -347,8 +348,8 @@ - (void)callInviteReceived:(TVOCallInvite *)callInvite {
347348
if (callInvite.from) {
348349
from = [callInvite.from stringByReplacingOccurrencesOfString:@"client:" withString:@""];
349350
}
350-
if (callInvite.customParameters[@"CallerName"]) {
351-
from = callInvite.customParameters[@"CallerName"];
351+
if (callInvite.customParameters[kCallerNameCustomParameter]) {
352+
from = callInvite.customParameters[kCallerNameCustomParameter];
352353
}
353354
// Always report to CallKit
354355
[self reportIncomingCallFrom:from withUUID:callInvite.uuid];

0 commit comments

Comments
 (0)