Fixes https://github.com/turt2live/matrix-media-repo/issues/349
For https://github.com/turt2live/matrix-media-repo/issues/15