Add support for native E2E
Fixes #185
This PR adds support for the new native E2E built into the bot-sdk, which removes the need for pan. I've tested this works locally, but it's not extensively battle tested. I've also:
- Kept the pan config, but added a check to avoid trying to use pan and this feature concurrrently.
- Changed the README to recommend admins use this feature, as it's easier to setup.
This could potentially be enabled by default, but I didn't want to change things for existing users.
I cribbed from https://github.com/turt2live/matrix-bot-sdk/blob/master/examples/encryption_bot.ts when writing this code.
The test failures are due to matrix-bot-sdk now depending on Node 14+ or greater, I am not sure how comfortable you folks are with increasing the minimum node version, but 12 is due to be EOL by April this year anyway..
I've been asking around and nobody seems to mind too much if we switch to Node 14+.
Let's wait until we have https://github.com/matrix-org/mjolnir/pull/192 for testing.
@Half-Shot Could you rebase and retry? We have fixed numerous issues on CI, I hope things will be run smoother now.
@Yoric I had a go but I think it's very busted for me. I had to modify the test setup code a bit because we need to extract an access token out of /register for the E2EE stuff to work.
@Half-Shot Is there anything we can do to help?
Whats the state on this? Is it just the tests failing?