mirror of
https://github.com/outline/outline.git
synced 2026-11-28 08:14:58 +03:00
fix: Do not update lastModifiedById on deleted documents (edit history still stored in revisions) (#10302)
This commit is contained in:
1 parent
398943d084
commit
10c3edded7
1 file changed
+5
-3
@@ -44,9 +44,11 @@ export default async function documentCollaborativeUpdater({
|
||||
const state = Y.encodeStateAsUpdate(ydoc);
|
||||
const content = yDocToProsemirrorJSON(ydoc, "default") as ProsemirrorData;
|
||||
const isUnchanged = isEqual(document.content, content);
|
||||
const lastModifiedById =
|
||||
sessionCollaboratorIds[sessionCollaboratorIds.length - 1] ??
|
||||
document.lastModifiedById;
|
||||
const isDeleted = !!document.deletedAt;
|
||||
const lastModifiedById = isDeleted
|
||||
? document.lastModifiedById
|
||||
: (sessionCollaboratorIds[sessionCollaboratorIds.length - 1] ??
|
||||
document.lastModifiedById);
|
||||
|
||||
if (isUnchanged) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user