diff --git a/src/Messages/Attachments/OWSAttachmentsProcessor.m b/src/Messages/Attachments/OWSAttachmentsProcessor.m index ea245a642..9982ca170 100644 --- a/src/Messages/Attachments/OWSAttachmentsProcessor.m +++ b/src/Messages/Attachments/OWSAttachmentsProcessor.m @@ -61,6 +61,7 @@ NS_ASSUME_NONNULL_BEGIN [supportedAttachmentPointers addObject:pointer]; [supportedAttachmentIds addObject:pointer.uniqueId]; } else { + DDLogError(@"%@ Received unsupported attachment of type: %@", self.tag, pointer.contentType); TSInfoMessage *infoMessage = [[TSInfoMessage alloc] initWithTimestamp:timestamp inThread:thread messageType:TSInfoMessageTypeUnsupportedMessage]; @@ -87,6 +88,16 @@ NS_ASSUME_NONNULL_BEGIN return self.supportedAttachmentPointers.count > 0; } ++ (NSString *)tag +{ + return [NSString stringWithFormat:@"[%@]", self.class]; +} + +- (NSString *)tag +{ + return self.class.tag; +} + @end NS_ASSUME_NONNULL_END diff --git a/src/Util/MIMETypeUtil.m b/src/Util/MIMETypeUtil.m index 6e89ee86b..420abece4 100644 --- a/src/Util/MIMETypeUtil.m +++ b/src/Util/MIMETypeUtil.m @@ -20,6 +20,7 @@ NSString *const OWSMimeTypeImagePng = @"image/png"; + (NSDictionary *)supportedAudioMIMETypesToExtensionTypes { return @{ + @"audio/aac" : @"m4a", @"audio/x-m4p" : @"m4p", @"audio/x-m4b" : @"m4b", @"audio/x-m4a" : @"m4a",