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

39 lines
839 B
Mathematica
Raw Normal View History

2015-10-01 18:19:52 +02:00
#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