Swiftgram/MTProtoKit/MTMessageTransaction.m
2018-06-13 17:11:43 +03:00

27 lines
805 B
Objective-C

#import "MTMessageTransaction.h"
#import "MTInternalId.h"
MTInternalIdClass(MTMessageTransaction)
@implementation MTMessageTransaction
- (instancetype)initWithMessagePayload:(NSArray *)messagePayload prepared:(void (^)(NSDictionary *messageInternalIdToPreparedMessage))prepared failed:(void (^)())failed completion:(void (^)(NSDictionary *messageInternalIdToTransactionId, NSDictionary *messageInternalIdToPreparedMessage, NSDictionary *messageInternalIdToQuickAckId))completion
{
self = [super init];
if (self != nil)
{
_internalId = [[MTInternalId(MTMessageTransaction) alloc] init];
_messagePayload = messagePayload;
_completion = [completion copy];
_prepared = [prepared copy];
_failed = [failed copy];
}
return self;
}
@end