Parse phone numbers into e164 as part of schema upgrade

This commit is contained in:
Scott Nonnenberg
2018-05-08 18:03:02 -07:00
parent 8cb1f1f532
commit aa13a2c6f7
8 changed files with 87 additions and 8 deletions

View File

@@ -50,7 +50,7 @@ const { IdleDetector } = require('./modules/idle_detector');
const MessageDataMigrator = require('./modules/messages_data_migrator');
exports.setup = (options = {}) => {
const { Attachments, userDataPath } = options;
const { Attachments, userDataPath, getRegionCode } = options;
const Components = {
ContactDetail,
@@ -84,6 +84,7 @@ exports.setup = (options = {}) => {
upgradeMessageSchema: message =>
Message.upgradeSchema(message, {
writeNewAttachmentData: Attachments.createWriterForNew(attachmentsPath),
getRegionCode,
}),
writeMessageAttachments: Message.createAttachmentDataWriter(
Attachments.createWriterForExisting(attachmentsPath)