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

39 lines
839 B
Objective-C

#import "TGBridgeConversationSubscription.h"
NSString *const TGBridgeConversationSubscriptionName = @"chats.conversation";
NSString *const TGBridgeConversationSubscriptionPeerIdKey = @"peerId";
@implementation TGBridgeConversationSubscription
- (instancetype)initWithPeerId:(int64_t)peerId
{
self = [super init];
if (self != nil)
{
_peerId = peerId;
}
return self;
}
- (bool)dropPreviouslyQueued
{
return true;
}
- (void)_serializeParametersWithCoder:(NSCoder *)aCoder
{
[aCoder encodeInt64:self.peerId forKey:TGBridgeConversationSubscriptionPeerIdKey];
}
- (void)_unserializeParametersWithCoder:(NSCoder *)aDecoder
{
_peerId = [aDecoder decodeInt64ForKey:TGBridgeConversationSubscriptionPeerIdKey];
}
+ (NSString *)subscriptionName
{
return TGBridgeConversationSubscriptionName;
}
@end