turt2live / matrix-bot-sdk

TypeScript/JavaScript SDK for Matrix bots
MIT License
193 stars 68 forks source link

Appservice user events #33

Open Sorunome opened 5 years ago

Sorunome commented 5 years ago

The appservice user events (room.join, room.invite, room.leave) only easily present the roomId, the userId needs to be fetched via the event.

As the userId is commonly needed for handling those events, perhaps consider making that a parameter

turt2live commented 5 years ago

Ideally I'd actually like to go the other way and push the room ID into the event. This isn't being done currently because the event object is any due to it being the JSON object received over the wire. https://github.com/turt2live/matrix-js-bot-sdk/issues/11 would address this though.