mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-27 20:03:25 +01:00
Initialize schema version upon import
This commit is contained in:
@@ -195,11 +195,13 @@ exports.createImporter = (writeExistingAttachmentData) => {
|
||||
throw new TypeError('"writeExistingAttachmentData" must be a function');
|
||||
}
|
||||
|
||||
return async (message) => {
|
||||
if (!exports.isValid(message)) {
|
||||
throw new TypeError('"message" is not valid');
|
||||
return async (rawMessage) => {
|
||||
if (!exports.isValid(rawMessage)) {
|
||||
throw new TypeError('"rawMessage" is not valid');
|
||||
}
|
||||
|
||||
const message = exports.initializeSchemaVersion(rawMessage);
|
||||
|
||||
const { attachments } = message;
|
||||
const hasAttachments = attachments && attachments.length > 0;
|
||||
if (!hasAttachments) {
|
||||
|
||||
Reference in New Issue
Block a user