Data API: new route to get past version of a note

I am aware that there exists a revisionsroute to get note revisions from the Data API, however it returns the actual revision data with a diff that has to be applied using the diff-match-patch library.
I’ve tried to make that work from a native desktop program, but I could was not able to get the same results as the ones shown in the Joplin UI when selecting a previous version of a note.

For this reason, I thought to actually let Joplin do the work, so the results are consistent. I made a fork and added a new revisionNote route which takes the ID of a revision as input and returns the note (including its full body and title) as it was when the specified revision was created.

I made this specifically to fit my needs, but if there is interest I can clean up the feature and open a pull request.
Any suggestions to make it more broadly useful are welcome.

1 Like