1
0
mirror of https://github.com/danog/Telegram.git synced 2025-01-06 04:58:56 +01:00
Telegram/Watch/Bridge/TGBridgeReplyMessageMediaAttachment.m

34 lines
907 B
Mathematica
Raw Normal View History

2015-10-01 18:19:52 +02:00
#import "TGBridgeReplyMessageMediaAttachment.h"
#import "TGBridgeMessage.h"
const NSInteger TGBridgeReplyMessageMediaAttachmentType = 414002169;
NSString *const TGBridgeReplyMessageMediaMidKey = @"mid";
NSString *const TGBridgeReplyMessageMediaMessageKey = @"message";
@implementation TGBridgeReplyMessageMediaAttachment
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
self = [super init];
if (self != nil)
{
_mid = [aDecoder decodeInt32ForKey:TGBridgeReplyMessageMediaMidKey];
_message = [aDecoder decodeObjectForKey:TGBridgeReplyMessageMediaMessageKey];
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeInt32:self.mid forKey:TGBridgeReplyMessageMediaMidKey];
[aCoder encodeObject:self.message forKey:TGBridgeReplyMessageMediaMessageKey];
}
+ (NSInteger)mediaType
{
return TGBridgeReplyMessageMediaAttachmentType;
}
@end