mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Showing name of contact on outgoing phone call
This commit is contained in:
parent
9b4afebbd5
commit
af9f8579b6
|
@ -249,14 +249,16 @@ typedef enum : NSUInteger {
|
|||
-(PhoneNumber*)phoneNumberForThread
|
||||
{
|
||||
NSString * contactId = [(TSContactThread*)self.thread contactIdentifier];
|
||||
PhoneNumber * phoneNumber = [PhoneNumber tryParsePhoneNumberFromUserSpecifiedText:contactId];
|
||||
return phoneNumber;
|
||||
return [PhoneNumber tryParsePhoneNumberFromUserSpecifiedText:contactId];
|
||||
}
|
||||
|
||||
-(void)callAction
|
||||
{
|
||||
if ([self isRedPhoneReachable]) {
|
||||
[Environment.phoneManager initiateOutgoingCallToRemoteNumber:[self phoneNumberForThread]];
|
||||
PhoneNumber *number = [self phoneNumberForThread];
|
||||
Contact *contact = [[Environment.getCurrent contactsManager] latestContactForPhoneNumber:number];
|
||||
|
||||
[Environment.phoneManager initiateOutgoingCallToContact:contact atRemoteNumber:number];
|
||||
} else {
|
||||
DDLogWarn(@"Tried to initiate a call but contact has no RedPhone identifier");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue