mirror of
https://github.com/danog/Telegram.git
synced 2024-12-02 17:38:07 +01:00
39 lines
839 B
Mathematica
39 lines
839 B
Mathematica
|
#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
|