Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
tneotia committed Dec 27, 2022
2 parents 9799e8f + cbd57e8 commit 63aea2c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
8 changes: 4 additions & 4 deletions MacOS-10/BlueBubblesHelper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 = /;
Expand All @@ -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 = "";
Expand All @@ -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 = /;
Expand All @@ -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 = "";
Expand Down
Binary file not shown.
14 changes: 12 additions & 2 deletions MacOS-10/BlueBubblesHelper/BlueBubblesHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -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:(@{})];
Expand Down

0 comments on commit 63aea2c

Please sign in to comment.