diff --git a/SignalServiceKit/Messages/Attachments/TSAttachment.h b/SignalServiceKit/Messages/Attachments/TSAttachment.h index 3495b47df1..22633dc05c 100644 --- a/SignalServiceKit/Messages/Attachments/TSAttachment.h +++ b/SignalServiceKit/Messages/Attachments/TSAttachment.h @@ -95,14 +95,6 @@ typedef NS_CLOSED_ENUM(NSUInteger, TSAnimatedMimeType) { uploadTimestamp:(unsigned long long)uploadTimestamp videoDuration:(nullable NSNumber *)videoDuration NS_DESIGNATED_INITIALIZER; -// This constructor is used for new instances of TSAttachmentPointer, -// i.e. undownloaded restoring attachments. -- (instancetype)initForRestoreWithUniqueId:(NSString *)uniqueId - contentType:(NSString *)contentType - sourceFilename:(nullable NSString *)sourceFilename - caption:(nullable NSString *)caption - albumMessageId:(nullable NSString *)albumMessageId NS_DESIGNATED_INITIALIZER; - // This constructor is used for new instances of TSAttachmentStream // that represent new, un-uploaded outgoing attachments. - (instancetype)initAttachmentWithContentType:(NSString *)contentType diff --git a/SignalServiceKit/Messages/Attachments/TSAttachment.m b/SignalServiceKit/Messages/Attachments/TSAttachment.m index b9b19d2fd1..8945efb9ad 100644 --- a/SignalServiceKit/Messages/Attachments/TSAttachment.m +++ b/SignalServiceKit/Messages/Attachments/TSAttachment.m @@ -86,40 +86,6 @@ NSUInteger const TSAttachmentSchemaVersion = 1; return self; } -// This constructor is used for new instances of TSAttachmentPointer, -// i.e. undownloaded restoring attachments. -- (instancetype)initForRestoreWithUniqueId:(NSString *)uniqueId - contentType:(NSString *)contentType - sourceFilename:(nullable NSString *)sourceFilename - caption:(nullable NSString *)caption - albumMessageId:(nullable NSString *)albumMessageId -{ - OWSAssertDebug(uniqueId.length > 0); - if (contentType.length < 1) { - OWSLogWarn(@"incoming attachment has invalid content type"); - - contentType = MimeTypeUtil.mimeTypeApplicationOctetStream; - } - OWSAssertDebug(contentType.length > 0); - - // If saved, this AttachmentPointer would replace the AttachmentStream in the attachments collection. - // However we only use this AttachmentPointer should only be used during the export process so it - // won't be saved until we restore the backup (when there will be no AttachmentStream to replace). - self = [super initWithUniqueId:uniqueId]; - if (!self) { - return self; - } - - _contentType = contentType; - _sourceFilename = sourceFilename; - _caption = caption; - _albumMessageId = albumMessageId; - - _attachmentSchemaVersion = TSAttachmentSchemaVersion; - - return self; -} - // This constructor is used for new instances of TSAttachmentStream // that represent new, un-uploaded outgoing attachments. - (instancetype)initAttachmentWithContentType:(NSString *)contentType diff --git a/SignalServiceKit/Messages/Attachments/TSAttachmentPointer.h b/SignalServiceKit/Messages/Attachments/TSAttachmentPointer.h index d06eb1add3..91e36e99c3 100644 --- a/SignalServiceKit/Messages/Attachments/TSAttachmentPointer.h +++ b/SignalServiceKit/Messages/Attachments/TSAttachmentPointer.h @@ -59,12 +59,6 @@ NSString *NSStringForTSAttachmentPointerState(TSAttachmentPointerState value); uploadTimestamp:(unsigned long long)uploadTimestamp videoDuration:(nullable NSNumber *)videoDuration NS_UNAVAILABLE; -- (instancetype)initForRestoreWithUniqueId:(NSString *)uniqueId - contentType:(NSString *)contentType - sourceFilename:(nullable NSString *)sourceFilename - caption:(nullable NSString *)caption - albumMessageId:(nullable NSString *)albumMessageId NS_UNAVAILABLE; - - (instancetype)initAttachmentWithContentType:(NSString *)contentType byteCount:(UInt32)byteCount sourceFilename:(nullable NSString *)sourceFilename diff --git a/SignalServiceKit/Messages/Attachments/TSAttachmentStream.h b/SignalServiceKit/Messages/Attachments/TSAttachmentStream.h index 10b4bdddda..62be09d9d8 100644 --- a/SignalServiceKit/Messages/Attachments/TSAttachmentStream.h +++ b/SignalServiceKit/Messages/Attachments/TSAttachmentStream.h @@ -44,12 +44,6 @@ NSString *NSStringForAttachmentThumbnailQuality(TSAttachmentThumbnailQuality val uploadTimestamp:(unsigned long long)uploadTimestamp videoDuration:(nullable NSNumber *)videoDuration NS_UNAVAILABLE; -- (instancetype)initForRestoreWithUniqueId:(NSString *)uniqueId - contentType:(NSString *)contentType - sourceFilename:(nullable NSString *)sourceFilename - caption:(nullable NSString *)caption - albumMessageId:(nullable NSString *)albumMessageId NS_UNAVAILABLE; - - (instancetype)initAttachmentWithContentType:(NSString *)contentType byteCount:(UInt32)byteCount sourceFilename:(nullable NSString *)sourceFilename