The edit code I wrote could - after a rewrite - perhaps be added to the SDK's repo! Relevant file: [MatrixClient.ts](https://github.com/turt2live/matrix-bot-sdk/blob/main/src/MatrixClient.ts)