Update to support Nextcloud 22 and rewrite

Merged Thomas Citharel requested to merge update-rewrite into main

Merge request reports