diff --git a/services/docstore/app/js/RangeManager.js b/services/docstore/app/js/RangeManager.js index f36f68fe35..0b97c23cba 100644 --- a/services/docstore/app/js/RangeManager.js +++ b/services/docstore/app/js/RangeManager.js @@ -53,6 +53,9 @@ module.exports = RangeManager = { if ((comment.op != null ? comment.op.t : undefined) != null) { comment.op.t = RangeManager._safeObjectId(comment.op.t) } + // resolved property is added to comments when they are obtained from history, but this state doesn't belong in mongo docs collection + // more info: https://github.com/overleaf/internal/issues/24371#issuecomment-2913095174 + delete comment.op?.resolved updateMetadata(comment.metadata) } return ranges diff --git a/services/web/app/src/Features/History/RestoreManager.js b/services/web/app/src/Features/History/RestoreManager.js index 8c73695eed..1db32b998d 100644 --- a/services/web/app/src/Features/History/RestoreManager.js +++ b/services/web/app/src/Features/History/RestoreManager.js @@ -231,8 +231,6 @@ const RestoreManager = { delete threadData.resolved_by_user_id delete threadData.resolved_at } - // remove the resolved property from the comment range as the chat service is synced at this point - delete commentRange.op.resolved } await ChatManager.promises.injectUserInfoIntoThreads(newCommentThreadData)