Send origin metadata through docupdater and project-history when restoring files (#18721)

* add RestoreFileOrigin in overleaf-editor-core

* support source to be an object

* use sourceOrOrigin as param

* rename to originOrSource so the priority is more clear

* get timestamp from version

* fix test

* include version and min_count in getUpdatesFromHistory

* extractOriginOrSource util function

* fix RestoreManagerTests

GitOrigin-RevId: 0ace05a6ade2794c753a9d0bffb4f858ecc6899a
This commit is contained in:
Domagoj Kriskovic
2024-06-18 08:04:34 +00:00
committed by Copybot
parent 5a5defee69
commit 7e8e2b0585
11 changed files with 186 additions and 15 deletions
@@ -285,7 +285,7 @@ export const EditorManagerProvider: FC = ({ children }) => {
) {
return
}
if (update.meta.source === 'file-revert') {
if (update.meta.origin?.kind === 'file-restore') {
return
}
showGenericMessageModal(