adds some clues about how to implement tapbacks
This commit is contained in:
@@ -57,6 +57,26 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
#if 0
|
||||
- (NSDictionary *)adjustMessageSummaryInfoForSending:(NSDictionary *)messageSummaryInfo
|
||||
{
|
||||
NSMutableDictionary *adjustedInfo = [messageSummaryInfo mutableCopy];
|
||||
if (!adjustedInfo) {
|
||||
adjustedInfo = [NSMutableDictionary dictionary];
|
||||
}
|
||||
|
||||
if ([fullText length] > 50) {
|
||||
summary = [[summary substringToIndex:[summary rangeOfComposedCharacterSequenceAtIndex:kMaxSummaryLength].location] stringByAppendingString:@"…"];
|
||||
adjustedInfo[IMMessageSummaryInfoSummary] = summary;
|
||||
}
|
||||
|
||||
|
||||
adjustedInfo[IMMessageSummaryInfoTapbackRepresentationKey] = @"Loved";
|
||||
|
||||
return adjustedInfo;
|
||||
}
|
||||
#endif
|
||||
|
||||
- (void)main
|
||||
{
|
||||
NSObject<HTTPResponse> *response = [[HTTPErrorResponse alloc] initWithErrorCode:500];
|
||||
@@ -75,6 +95,17 @@
|
||||
return;
|
||||
}
|
||||
|
||||
// tapbacks
|
||||
#if 0
|
||||
IMMessage *acknowledgment = [IMMessage instantMessageWithAssociatedMessageContent: /* [NSString stringWithFormat:@"%@ \"%%@\"", tapbackAction] */
|
||||
flags:0
|
||||
associatedMessageGUID:guid
|
||||
associatedMessageType:IMAssociatedMessageTypeAcknowledgmentHeart
|
||||
associatedMessageRange:[imMessage messagePartRange]
|
||||
messageSummaryInfo:[self adjustMessageSummaryInfoForSending:message]
|
||||
threadIdentifier:[imMessage threadIdentifier]];
|
||||
#endif
|
||||
|
||||
NSArray *transferGUIDs = [args objectForKey:@"fileTransferGUIDs"];
|
||||
if (!transferGUIDs) {
|
||||
transferGUIDs = @[];
|
||||
|
||||
Reference in New Issue
Block a user