Fix missing albumMessageId.

This commit is contained in:
Matthew Chen 2018-11-09 16:09:26 -05:00
parent 8acca4d56a
commit da4f41defc
2 changed files with 5 additions and 1 deletions

View file

@ -15,7 +15,9 @@ public class OWS113MultiAttachmentMediaMessages: OWSDatabaseMigration {
// Increment a similar constant for each migration.
@objc
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) {

View file

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