mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-12 19:49:59 +05:00
Send idCollision feedback only once per new doc
This commit is contained in:
parent
2ed07f1c26
commit
ea004e3f0b
@ -102,7 +102,10 @@ define([
|
||||
hashes: {},
|
||||
ids: {},
|
||||
mediasSources: {},
|
||||
version: privateData.ooForceVersion ? Number(privateData.ooForceVersion) : OOCurrentVersion.currentVersionNumber
|
||||
version: privateData.ooForceVersion ? Number(privateData.ooForceVersion) : OOCurrentVersion.currentVersionNumber,
|
||||
debug: {
|
||||
idCollision: false,
|
||||
},
|
||||
};
|
||||
var oldHashes = {};
|
||||
var oldIds = {};
|
||||
@ -2632,7 +2635,13 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
|
||||
|
||||
const onCorruptionWarning = Util.once((id) => {
|
||||
console.log('id collision in document', id);
|
||||
Feedback.send('OFFICE_DOCUMENT_ID_COLLISION', true);
|
||||
if (content?.debug?.idCollision !== undefined // No feedback for old documents
|
||||
&& content?.debug?.idCollision === false) { // Send feedback only once
|
||||
Feedback.send(`channel=${content.channel}&OFFICE_DOCUMENT_ID_COLLISION`, true);
|
||||
content.debug = content.debug || {};
|
||||
content.debug.idCollision = true;
|
||||
APP.onLocal();
|
||||
}
|
||||
});
|
||||
|
||||
APP.docEditor.connectMockServer({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user