to backport, run osc mbranch matrix-synapse, and apply the following patch: https://github.com/matrix-org/synapse/pull/3371/commits/0834b49c6a9b6c597a154d4b2dfcf8fff90699ec