Convert some of synapse.rest.media to async/await.