Skip to content

Join event spam because of unstable URL in reason #267

@MadLittleMods

Description

@MadLittleMods

Join event spam because of unstable URL in reason which means any time it's different, will create a new state event. Depending on how someone views the archive, the reason text will include a different URL.

Example:

Flip-flopping between https://archive.matrix.org/roomid/wOlkWNmgkAZFxbTaqj:matrix.org with the room ID and https://archive.matrix.org/r/raspberrypi:matrix.org with the room alias depending on how the URL is visited.

{
  "content": {
    "displayname": "archive.matrix.org/faq",
    "membership": "join",
    "reason": "Joining room to check history visibility. If your room is public with shared or world readable history visibility, it will be accessible at https://archive.matrix.org/roomid/wOlkWNmgkAZFxbTaqj:matrix.org. See the FAQ for more details: https://github.com/matrix-org/matrix-public-archive/blob/main/docs/faq.md#why-did-the-archive-bot-join-my-room"
  },
  "origin_server_ts": 1687415330265,
  "sender": "@archive:matrix.org",
  "state_key": "@archive:matrix.org",
  "type": "m.room.member",
  "unsigned": {
    "replaces_state": "$wlnRuzw6mTVYvUMkBmHD5jXGROSZglqnzG7ZrRQtmOA",
    "prev_content": {
      "displayname": "archive.matrix.org/faq",
      "membership": "join",
      "reason": "Joining room to check history visibility. If your room is public with shared or world readable history visibility, it will be accessible at https://archive.matrix.org/r/raspberrypi:matrix.org. See the FAQ for more details: https://github.com/matrix-org/matrix-public-archive/blob/main/docs/faq.md#why-did-the-archive-bot-join-my-room"
    },
    "prev_sender": "@archive:matrix.org",
    "age": 2558
  },
  "event_id": "$cyfYrA3MW6w2c44z1_VWNfeRgUko2HkBlTM11EZqB1E",
  "room_id": "!wOlkWNmgkAZFxbTaqj:matrix.org"
}

Potential solutions

It would be nice if we could always use the room ID so it's consistent regardless of the alias someone visits from. But we don't have access to the room ID before we join.

Another simple option is to just remove the URL altogether.

Dev notes

The join reason logic was originally added in #262

Metadata

Metadata

Assignees

Labels

T-DefectSomething isn't working. Bugs, crashes, or other reported issues.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions