|
|
|
@ -14,15 +14,14 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
success:(void (^)(void))successHandler
|
|
|
|
|
failure:(void (^)(NSError *error))failureHandler
|
|
|
|
|
{
|
|
|
|
|
if (self.sendMessageWasCalledBlock) {
|
|
|
|
|
self.sendMessageWasCalledBlock(message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (self.stubbedFailingError) {
|
|
|
|
|
failureHandler(self.stubbedFailingError);
|
|
|
|
|
} else {
|
|
|
|
|
successHandler();
|
|
|
|
|
}
|
|
|
|
|
if (self.sendMessageWasCalledBlock) {
|
|
|
|
|
self.sendMessageWasCalledBlock(message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void)sendAttachment:(DataSource *)dataSource
|
|
|
|
@ -32,15 +31,14 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
success:(void (^)(void))successHandler
|
|
|
|
|
failure:(void (^)(NSError *error))failureHandler
|
|
|
|
|
{
|
|
|
|
|
if (self.sendAttachmentWasCalledBlock) {
|
|
|
|
|
self.sendAttachmentWasCalledBlock(outgoingMessage);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (self.stubbedFailingError) {
|
|
|
|
|
failureHandler(self.stubbedFailingError);
|
|
|
|
|
} else {
|
|
|
|
|
successHandler();
|
|
|
|
|
}
|
|
|
|
|
if (self.sendAttachmentWasCalledBlock) {
|
|
|
|
|
self.sendAttachmentWasCalledBlock(outgoingMessage);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- (void)sendTemporaryAttachment:(DataSource *)dataSource
|
|
|
|
@ -49,15 +47,14 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
success:(void (^)(void))successHandler
|
|
|
|
|
failure:(void (^)(NSError *error))failureHandler
|
|
|
|
|
{
|
|
|
|
|
if (self.sendTemporaryAttachmentWasCalledBlock) {
|
|
|
|
|
self.sendTemporaryAttachmentWasCalledBlock(outgoingMessage);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (self.stubbedFailingError) {
|
|
|
|
|
failureHandler(self.stubbedFailingError);
|
|
|
|
|
} else {
|
|
|
|
|
successHandler();
|
|
|
|
|
}
|
|
|
|
|
if (self.sendTemporaryAttachmentWasCalledBlock) {
|
|
|
|
|
self.sendTemporaryAttachmentWasCalledBlock(outgoingMessage);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|