From 2ae26e25100c3f1e8808bf0b8809e6c9bb1c1ee3 Mon Sep 17 00:00:00 2001 From: Adam Demasi Date: Thu, 1 Jun 2017 13:46:36 +0930 Subject: [PATCH] [relay] why wasn't i just using otherPerson??? --- relay/IMAgentRelay.x | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/relay/IMAgentRelay.x b/relay/IMAgentRelay.x index 8925804..284138b 100644 --- a/relay/IMAgentRelay.x +++ b/relay/IMAgentRelay.x @@ -80,17 +80,15 @@ void HBTSPostMessage(HBTSMessageType type, NSString *name, BOOL isTyping) { %orig; IMFileTransfer *transfer = [self transferForGUID:transferGUID]; - - HBTSPostMessage(HBTSMessageTypeSendingFile, [[%c(IMDMessageStore) sharedInstance] messageWithGUID:transfer.messageGUID].handle, NO); + HBTSPostMessage(HBTSMessageTypeSendingFile, transfer.otherPerson, NO); } -- (void)updateTransfer:(NSString *)transferGUID currentBytes:(unsigned long long)currentBytes totalBytes:(unsigned long long)totalBytes { +- (void)updateTransfer:(NSString *)transferGUID currentBytes:(size_t)currentBytes totalBytes:(size_t)totalBytes { %orig; - IMFileTransfer *transfer = [self transferForGUID:transferGUID]; - if (currentBytes >= totalBytes) { - HBTSPostMessage(HBTSMessageTypeTypingEnded, [[%c(IMDMessageStore) sharedInstance] messageWithGUID:transfer.messageGUID].handle, NO); + IMFileTransfer *transfer = [self transferForGUID:transferGUID]; + HBTSPostMessage(HBTSMessageTypeTypingEnded, transfer.otherPerson, NO); } }