[bug] Fix forcesave button behavior in co-editing mode

This commit is contained in:
konovalovsergey
2020-04-28 12:03:16 +03:00
parent 84fd779d54
commit 0376217329
2 changed files with 9 additions and 0 deletions

View File

@ -2405,6 +2405,10 @@ exports.install = function(server, callbackFunction) {
let changesToSend = arrNewDocumentChanges;
if(changesToSend.length > cfgPubSubMaxChanges) {
changesToSend = null;
} else {
changesToSend.forEach((value) => {
value.time = value.time.getTime();
})
}
yield* publish({type: commonDefines.c_oPublishType.changes, docId: docId, userId: userId,
changes: changesToSend, startIndex: startIndex, changesIndex: puckerIndex,
@ -2424,6 +2428,10 @@ exports.install = function(server, callbackFunction) {
let changesToSend = arrNewDocumentChanges;
if(changesToSend.length > cfgPubSubMaxChanges) {
changesToSend = null;
} else {
changesToSend.forEach((value) => {
value.time = value.time.getTime();
})
}
let isPublished = yield* publish({type: commonDefines.c_oPublishType.changes, docId: docId, userId: userId,
changes: changesToSend, startIndex: startIndex, changesIndex: puckerIndex,

View File

@ -49,6 +49,7 @@ var pool = new pg.Pool({
idleTimeoutMillis: 30000
});
//todo datetime timezone
pg.defaults.parseInputDatesAsUTC = true;
types.setTypeParser(1114, function(stringValue) {
return new Date(stringValue + '+0000');
});