this is an attempt to solve coop-cloud/organising#213, but turns out it's quite difficult. https://stackoverflow.com/questions/52774830