turt2live / matrix-bot-sdk

TypeScript/JavaScript SDK for Matrix bots
MIT License
199 stars 69 forks source link

Look up correct property from request body object #272

Closed AndrewFerr closed 1 year ago

AndrewFerr commented 1 year ago

Also add some type-checking

Checklist

AndrewFerr commented 1 year ago

This PR indeed fixes matrix-org/matrix-rust-sdk#1093 and turt2live/matrix-bot-sdk#256.

Here's one way to trigger it: 1) create an encrypted room 2) invite a E2EE-capable bot to it 3) exchange some messages 4) invite any other user the room

Also, this seems to happen only when using bot-style / CS-API bots, not appservice-style bots, which makes sense since the problem happens during /sync.

turt2live commented 1 year ago

I've opened https://github.com/turt2live/matrix-bot-sdk/pull/288 to cover the bug while we wait for the rust-sdk to have better types.