mirror of
https://github.com/danog/Telegram.git
synced 2024-12-11 17:09:46 +01:00
34 lines
752 B
Objective-C
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
|