mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
added changeId into entity_changes to have cross-sync change ID
This commit is contained in:
@@ -3,6 +3,7 @@ const sourceIdService = require('./source_id');
|
||||
const dateUtils = require('./date_utils');
|
||||
const log = require('./log');
|
||||
const cls = require('./cls');
|
||||
const utils = require('./utils');
|
||||
const becca = require("../becca/becca");
|
||||
|
||||
let maxEntityChangeId = 0;
|
||||
@@ -12,6 +13,10 @@ function addEntityChange(origEntityChange) {
|
||||
|
||||
delete ec.id;
|
||||
|
||||
if (!ec.changeId) {
|
||||
ec.changeId = utils.randomString(12);
|
||||
}
|
||||
|
||||
ec.sourceId = ec.sourceId || cls.getSourceId() || sourceIdService.getCurrentSourceId();
|
||||
ec.isSynced = ec.isSynced ? 1 : 0;
|
||||
ec.isErased = ec.isErased ? 1 : 0;
|
||||
|
||||
Reference in New Issue
Block a user