1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-02 09:27:55 +01:00
Telegram/Telegraph/TGSendInvitesActor.m
2014-07-10 18:11:09 +04:00

35 lines
710 B
Objective-C

#import "TGSendInvitesActor.h"
#import "ActionStage.h"
#import "TGTelegraph.h"
@implementation TGSendInvitesActor
+ (NSString *)genericPath
{
return @"/tg/auth/sendinvites/@";
}
- (void)execute:(NSDictionary *)__unused options
{
NSString *text = [options objectForKey:@"text"];
NSArray *phones = [options objectForKey:@"phones"];
self.cancelToken = [TGTelegraphInstance doSendInvites:phones text:text actor:self];
[ActionStageInstance() actionCompleted:self.path result:nil];
}
- (void)sendInvitesSuccess
{
[ActionStageInstance() actionCompleted:self.path result:nil];
}
- (void)sendInvitesFailed
{
[ActionStageInstance() actionFailed:self.path reason:-1];
}
@end