matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.75k stars 676 forks source link

Appservice receiving events from rooms it shouldn't #1835

Closed git-bruh closed 3 years ago

git-bruh commented 3 years ago

I have an appservice with the following appservice.yaml:

id: "discord"
url: "http://127.0.0.1:1234"
as_token: "[REDACTED]"
hs_token: "[REDACTED]"
sender_localpart: "appservice-discord"
namespaces:
  users:
    - exclusive: true
      regex: "@_discord.*"
    - regex: "@appservice.*" # Dendrite bug, appservice doesn't receive it's own DM events
  aliases:
    - exclusive: true
      regex: "#_discord.*"
  rooms: []

For some reason, dendrite sends my appservice events for the room#matrix-dev:matrix.org that it isn't registered for. I'm on a few other public rooms belonging to matrix.org but the appservice is not sent any events from them, as one would expect. How can i debug what's going wrong with this particular room ?

I'm running a dendrite that was built some days before commit https://github.com/matrix-org/dendrite/commit/af41f6d4549759afd7f52f780b40abe2834ab4c0.

tulir commented 3 years ago

Your registration says the bridge wants events in all rooms where some user ID starts with @appservice. #matrix-dev:matrix.org contains a user called @appservice-irc:matrix.org, which starts with @appservice.