matrix-org / matrix-org/matrix-spec

We probably shouldn't be sending App Services events from every room we know about

Open
#291 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Application-Services enhancement
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

While undocumented in the [Application Services API](https://matrix.org/docs/spec/application_service/unstable.html#registration), Synapse's current behavior is to check on any event it sees for whether an app service is interested in it, and then send it off to that app service. We should further filter these by the rooms than an application service are a part of.

Without this constraint, for instance with Half-Shot's [Discord Bridge](https://github.com/half-shot/matrix-appservice-discord), typing `!discord` in any channel causes about 10 different bots running on 10 different homeservers to try and answer. This also reportedly affects @turt2live's webhook bridge.

I plan to build the current loose functionality into Dendrite just to remain backwards compatible, but we really should change this unless anyone can give a reason why app services should get events from rooms they aren't in.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the Application Services API registration section and compare its documented behavior with Synapse's current event filtering and the compatibility concern raised for Dendrite. Determine whether room membership should constrain delivery, then update the relevant specification text and add any required examples or conformance guidance.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.