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

34 lines
752 B
Objective-C

#import "TGBridgeContactsSubscription.h"
NSString *const TGBridgeContactsSubscriptionName = @"contacts.search";
NSString *const TGBridgeContactsSubscriptionQueryKey = @"query";
@implementation TGBridgeContactsSubscription
- (instancetype)initWithQuery:(NSString *)query
{
self = [super init];
if (self != nil)
{
_query = query;
}
return self;
}
- (void)_serializeParametersWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:self.query forKey:TGBridgeContactsSubscriptionQueryKey];
}
- (void)_unserializeParametersWithCoder:(NSCoder *)aDecoder
{
_query = [aDecoder decodeObjectForKey:TGBridgeContactsSubscriptionQueryKey];
}
+ (NSString *)subscriptionName
{
return TGBridgeContactsSubscriptionName;
}
@end