diff --git a/MacOS-10/BlueBubblesHelper.xcodeproj/project.pbxproj b/MacOS-10/BlueBubblesHelper.xcodeproj/project.pbxproj index 55763aa..f0216dd 100644 --- a/MacOS-10/BlueBubblesHelper.xcodeproj/project.pbxproj +++ b/MacOS-10/BlueBubblesHelper.xcodeproj/project.pbxproj @@ -414,7 +414,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 10; + CURRENT_PROJECT_VERSION = 11; DEPLOYMENT_LOCATION = YES; DEVELOPMENT_TEAM = S6D73TBQQU; DSTROOT = /; @@ -429,7 +429,7 @@ INSTALL_PATH = "/Library/Application Support/MacEnhance/Plugins"; MACH_O_TYPE = mh_dylib; MACOSX_DEPLOYMENT_TARGET = 10.12; - MARKETING_VERSION = 0.0.8; + MARKETING_VERSION = 0.0.9; PRODUCT_BUNDLE_IDENTIFIER = com.bluebubbles.messaging; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -446,7 +446,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 10; + CURRENT_PROJECT_VERSION = 11; DEPLOYMENT_LOCATION = YES; DEVELOPMENT_TEAM = S6D73TBQQU; DSTROOT = /; @@ -461,7 +461,7 @@ INSTALL_PATH = "/Library/Application Support/MacEnhance/Plugins"; MACH_O_TYPE = mh_dylib; MACOSX_DEPLOYMENT_TARGET = 10.12; - MARKETING_VERSION = 0.0.8; + MARKETING_VERSION = 0.0.9; PRODUCT_BUNDLE_IDENTIFIER = com.bluebubbles.messaging; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/MacOS-10/BlueBubblesHelper.xcworkspace/xcuserdata/tanay.xcuserdatad/UserInterfaceState.xcuserstate b/MacOS-10/BlueBubblesHelper.xcworkspace/xcuserdata/tanay.xcuserdatad/UserInterfaceState.xcuserstate index 1a953d7..48ea0f5 100644 Binary files a/MacOS-10/BlueBubblesHelper.xcworkspace/xcuserdata/tanay.xcuserdatad/UserInterfaceState.xcuserstate and b/MacOS-10/BlueBubblesHelper.xcworkspace/xcuserdata/tanay.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/MacOS-10/BlueBubblesHelper/BlueBubblesHelper.m b/MacOS-10/BlueBubblesHelper/BlueBubblesHelper.m index eb8ba59..0be6f01 100644 --- a/MacOS-10/BlueBubblesHelper/BlueBubblesHelper.m +++ b/MacOS-10/BlueBubblesHelper/BlueBubblesHelper.m @@ -150,16 +150,26 @@ -(void) handleMessage: (NetworkController*)controller message:(NSString *)messa IMMessagePartChatItem *item; // sometimes items is an array so we need to account for that if ([items isKindOfClass:[NSArray class]]) { + for (IMMessagePartChatItem *i in (NSArray *) items) { + if ([i index] == [data[@"partIndex"] integerValue]) { + item = i; + break; + } + } item = [(NSArray *)items objectAtIndex:([data[@"partIndex"] integerValue])]; } else { item = (IMMessagePartChatItem *)items; } NSDictionary *messageSummary; if (item != nil) { - messageSummary = @{@"amc":@1,@"ams":item.text.string}; + NSAttributedString *text = [item text]; + if (text == nil) { + text = [message text]; + } + messageSummary = @{@"amc":@1,@"ams":text.string}; // Send the tapback // check if the body happens to be an object (ie an attachment) and send the tapback accordingly to show the proper summary - NSData *dataenc = [[item text].string dataUsingEncoding:NSNonLossyASCIIStringEncoding]; + NSData *dataenc = [text.string dataUsingEncoding:NSNonLossyASCIIStringEncoding]; NSString *encodevalue = [[NSString alloc]initWithData:dataenc encoding:NSUTF8StringEncoding]; if ([encodevalue isEqualToString:@"\\ufffc"]) { [chat sendMessageAcknowledgment:(reactionLong) forChatItem:(item) withMessageSummaryInfo:(@{})];