matrix-org / matrix-org/matrix-hookshot
Cache bridge's own state events
@AndrewFerr is already working on this.
Since Oct 4, 2022.
- Dominant language
- TypeScript
- Stars
- 450
- Forks
- 95
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 23
Description
When the bridge sets a room state event (namely a connection config), the bridge waits to get that state event back from the homeserver before updating in-memory structures. This is not only redundant, but means that any reads of room state (or anything related to it) may be stale until the bridge receives an echo of that state from the HS.
It would be nice if any call to the CS API endpoint for sending a state event (i.e. setStateEvent) would be replaced by a wrapper that would also update whatever objects in memory depend on that state (like the state field of connections). This would also permit the bridge to ignore any state events sent by the bridge itself, as they should already have been processed by the time they were sent. The mautrix suite uses an approach like this & it's rather convenient.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.