1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-11 17:09:46 +01:00
Telegram/Watch/Bridge/TGBridgeReplyMessageMediaAttachment+TGReplyMessageMediaAttachment.m
2015-10-01 19:19:52 +03:00

18 lines
683 B
Objective-C

#import "TGBridgeReplyMessageMediaAttachment+TGReplyMessageMediaAttachment.h"
#import "TGBridgeMessage+TGMessage.h"
@implementation TGBridgeReplyMessageMediaAttachment (TGReplyMessageMediaAttachment)
+ (TGBridgeReplyMessageMediaAttachment *)attachmentWithTGReplyMessageMediaAttachment:(TGReplyMessageMediaAttachment *)attachment
{
if (attachment == nil)
return nil;
TGBridgeReplyMessageMediaAttachment *bridgeAttachment = [[TGBridgeReplyMessageMediaAttachment alloc] init];
bridgeAttachment.mid = attachment.replyMessageId;
bridgeAttachment.message = [TGBridgeMessage messageWithTGMessage:attachment.replyMessage];
return bridgeAttachment;
}
@end