mirror of
https://github.com/danog/Telegram.git
synced 2024-12-04 02:17:51 +01:00
23 lines
809 B
Objective-C
23 lines
809 B
Objective-C
#import "TGBridgeContactMediaAttachment+TGContactMediaAttachment.h"
|
|
|
|
#import "TGPhoneUtils.h"
|
|
|
|
@implementation TGBridgeContactMediaAttachment (TGContactMediaAttachment)
|
|
|
|
+ (TGBridgeContactMediaAttachment *)attachmentWithTGContactMediaAttachment:(TGContactMediaAttachment *)attachment
|
|
{
|
|
if (attachment == nil)
|
|
return nil;
|
|
|
|
TGBridgeContactMediaAttachment *bridgeAttachment = [[TGBridgeContactMediaAttachment alloc] init];
|
|
bridgeAttachment.uid = attachment.uid;
|
|
bridgeAttachment.firstName = attachment.firstName;
|
|
bridgeAttachment.lastName = attachment.lastName;
|
|
bridgeAttachment.phoneNumber = attachment.phoneNumber;
|
|
bridgeAttachment.prettyPhoneNumber = [TGPhoneUtils formatPhone:attachment.phoneNumber forceInternational:false];
|
|
|
|
return bridgeAttachment;
|
|
}
|
|
|
|
@end
|