1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-04 02:17:51 +01:00
Telegram/Watch/Bridge/TGBridgeWebPageMediaAttachment+TGWebPageMediaAttachment.m
2015-10-01 19:19:52 +03:00

31 lines
1.3 KiB
Objective-C

#import "TGBridgeWebPageMediaAttachment+TGWebPageMediaAttachment.h"
#import "TGBridgeImageMediaAttachment+TGImageMediaAttachment.h"
@implementation TGBridgeWebPageMediaAttachment (TGWebPageMediaAttachment)
+ (TGBridgeWebPageMediaAttachment *)attachmentWithTGWebPageMediaAttachment:(TGWebPageMediaAttachment *)attachment
{
if (attachment == nil)
return nil;
TGBridgeWebPageMediaAttachment *bridgeAttachment = [[TGBridgeWebPageMediaAttachment alloc] init];
bridgeAttachment.webPageId = attachment.webPageId;
bridgeAttachment.url = attachment.url;
bridgeAttachment.displayUrl = attachment.displayUrl;
bridgeAttachment.pageType = attachment.pageType;
bridgeAttachment.siteName = attachment.siteName;
bridgeAttachment.title = attachment.title;
bridgeAttachment.pageDescription = attachment.pageDescription;
bridgeAttachment.photo = [TGBridgeImageMediaAttachment attachmentWithTGImageMediaAttachment:attachment.photo];
bridgeAttachment.embedUrl = attachment.embedUrl;
bridgeAttachment.embedType = attachment.embedType;
bridgeAttachment.embedSize = attachment.embedSize;
bridgeAttachment.duration = attachment.duration;
bridgeAttachment.author = attachment.author;
return bridgeAttachment;
}
@end