Fix missing albumMessageId.

pull/1/head
Matthew Chen 7 years ago
parent 8acca4d56a
commit da4f41defc

@ -15,7 +15,9 @@ public class OWS113MultiAttachmentMediaMessages: OWSDatabaseMigration {
// Increment a similar constant for each migration. // Increment a similar constant for each migration.
@objc @objc
class func migrationId() -> String { class func migrationId() -> String {
return "113" // NOTE: that we use .1 since there was a bug in the logic to
// set albumMessageId.
return "113.1"
} }
override public func runUp(completion: @escaping OWSDatabaseMigrationCompletion) { override public func runUp(completion: @escaping OWSDatabaseMigrationCompletion) {

@ -58,6 +58,7 @@ NSUInteger const TSAttachmentSchemaVersion = 4;
_contentType = contentType; _contentType = contentType;
_sourceFilename = sourceFilename; _sourceFilename = sourceFilename;
_caption = caption; _caption = caption;
_albumMessageId = albumMessageId;
_attachmentSchemaVersion = TSAttachmentSchemaVersion; _attachmentSchemaVersion = TSAttachmentSchemaVersion;
@ -126,6 +127,7 @@ NSUInteger const TSAttachmentSchemaVersion = 4;
} }
_contentType = contentType; _contentType = contentType;
_caption = pointer.caption; _caption = pointer.caption;
_albumMessageId = pointer.albumMessageId;
_attachmentSchemaVersion = TSAttachmentSchemaVersion; _attachmentSchemaVersion = TSAttachmentSchemaVersion;

Loading…
Cancel
Save