Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

/relations sometimes returns redacted relations #5618

@bwindels

Description

@bwindels

The example below has some redactions included, and some missing, in the /relations responses.
The message has 16 edits, numbered from 1 to 16, with a lot of them redacted. I suspect all of the missing events were redacted, but not 100% sure.

As you can see, over the 2 requests, there are only 5+3=8 events returned, whereas there are 16 edits.

GET /_matrix/client/unstable/rooms/!RbjQlmGUZlYnyhGpoZ%3Amatrix.org/relations/%241562233076292452qFAkd%3Amatrix.org/m.replace/m.room.message?
{
  "chunk": [
    {
      "content": {
        "body": " * edit redaction test 16",
        "m.new_content": {
          "body": "edit redaction test 16",
          "msgtype": "m.text"
        },
        "m.relates_to": {
          "event_id": "$1562233076292452qFAkd:matrix.org",
          "rel_type": "m.replace"
        },
        "msgtype": "m.text"
      },
      "event_id": "$1562240282316810sGcnC:matrix.org",
      "origin_server_ts": 1562240282012,
      "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
      "sender": "@bruno4:matrix.org",
      "type": "m.room.message",
      "unsigned": {
        "age": 9403081
      },
      "user_id": "@bruno4:matrix.org",
      "age": 9403081
    },
    {
      "content": {},
      "event_id": "$1562240279316805lYnLO:matrix.org",
      "origin_server_ts": 1562240279907,
      "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
      "sender": "@bruno4:matrix.org",
      "type": "m.room.message",
      "unsigned": {
        "redacted_by": "$15622403573146fPZgA:matrix.org",
        "redacted_because": {
          "type": "m.room.redaction",
          "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
          "sender": "@bruno4:matrix.org",
          "content": {},
          "redacts": "$1562240279316805lYnLO:matrix.org",
          "event_id": "$15622403573146fPZgA:matrix.org",
          "origin_server_ts": 1562240357245,
          "unsigned": {
            "age": 9327848
          },
          "user_id": "@bruno4:matrix.org",
          "age": 9327848
        },
        "age": 9405186
      },
      "user_id": "@bruno4:matrix.org",
      "age": 9405186,
      "redacted_because": {
        "type": "m.room.redaction",
        "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
        "sender": "@bruno4:matrix.org",
        "content": {},
        "redacts": "$1562240279316805lYnLO:matrix.org",
        "event_id": "$15622403573146fPZgA:matrix.org",
        "origin_server_ts": 1562240357245,
        "unsigned": {
          "age": 9327848
        },
        "user_id": "@bruno4:matrix.org",
        "age": 9327848
      }
    },
    {
      "content": {},
      "event_id": "$1562240278316801HXGmV:matrix.org",
      "origin_server_ts": 1562240278235,
      "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
      "sender": "@bruno4:matrix.org",
      "type": "m.room.message",
      "unsigned": {
        "redacted_by": "$15622408203152MRcbV:matrix.org",
        "redacted_because": {
          "type": "m.room.redaction",
          "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
          "sender": "@bruno4:matrix.org",
          "content": {},
          "redacts": "$1562240278316801HXGmV:matrix.org",
          "event_id": "$15622408203152MRcbV:matrix.org",
          "origin_server_ts": 1562240820856,
          "unsigned": {
            "age": 8864237
          },
          "user_id": "@bruno4:matrix.org",
          "age": 8864237
        },
        "age": 9406858
      },
      "user_id": "@bruno4:matrix.org",
      "age": 9406858,
      "redacted_because": {
        "type": "m.room.redaction",
        "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
        "sender": "@bruno4:matrix.org",
        "content": {},
        "redacts": "$1562240278316801HXGmV:matrix.org",
        "event_id": "$15622408203152MRcbV:matrix.org",
        "origin_server_ts": 1562240820856,
        "unsigned": {
          "age": 8864237
        },
        "user_id": "@bruno4:matrix.org",
        "age": 8864237
      }
    },
    {
      "content": {},
      "event_id": "$1562240276316797SJvMh:matrix.org",
      "origin_server_ts": 1562240276421,
      "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
      "sender": "@bruno4:matrix.org",
      "type": "m.room.message",
      "unsigned": {
        "redacted_by": "$15622409223157DciCb:matrix.org",
        "redacted_because": {
          "type": "m.room.redaction",
          "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
          "sender": "@bruno4:matrix.org",
          "content": {},
          "redacts": "$1562240276316797SJvMh:matrix.org",
          "event_id": "$15622409223157DciCb:matrix.org",
          "origin_server_ts": 1562240922055,
          "unsigned": {
            "age": 8763038
          },
          "user_id": "@bruno4:matrix.org",
          "age": 8763038
        },
        "age": 9408672
      },
      "user_id": "@bruno4:matrix.org",
      "age": 9408672,
      "redacted_because": {
        "type": "m.room.redaction",
        "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
        "sender": "@bruno4:matrix.org",
        "content": {},
        "redacts": "$1562240276316797SJvMh:matrix.org",
        "event_id": "$15622409223157DciCb:matrix.org",
        "origin_server_ts": 1562240922055,
        "unsigned": {
          "age": 8763038
        },
        "user_id": "@bruno4:matrix.org",
        "age": 8763038
      }
    },
    {
      "content": {
        "body": " * edit redaction test 12",
        "m.new_content": {
          "body": "edit redaction test 12",
          "msgtype": "m.text"
        },
        "m.relates_to": {
          "event_id": "$1562233076292452qFAkd:matrix.org",
          "rel_type": "m.replace"
        },
        "msgtype": "m.text"
      },
      "event_id": "$1562240273316792ZcxfK:matrix.org",
      "origin_server_ts": 1562240273827,
      "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
      "sender": "@bruno4:matrix.org",
      "type": "m.room.message",
      "unsigned": {
        "age": 9411266
      },
      "user_id": "@bruno4:matrix.org",
      "age": 9411266
    }
  ],
  "next_batch": "1114-1006882126"
}
GET https://matrix.org/_matrix/client/unstable/rooms/!RbjQlmGUZlYnyhGpoZ%3Amatrix.org/relations/%241562233076292452qFAkd%3Amatrix.org/m.replace/m.room.message?from=1114-1006882126
{
  "chunk": [
    {
      "content": {
        "body": " * edit redaction test 11",
        "m.new_content": {
          "body": "edit redaction test 11",
          "msgtype": "m.text"
        },
        "m.relates_to": {
          "event_id": "$1562233076292452qFAkd:matrix.org",
          "rel_type": "m.replace"
        },
        "msgtype": "m.text"
      },
      "event_id": "$1562240271316790rKqVb:matrix.org",
      "origin_server_ts": 1562240271884,
      "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
      "sender": "@bruno4:matrix.org",
      "type": "m.room.message",
      "unsigned": {
        "age": 9413483
      },
      "user_id": "@bruno4:matrix.org",
      "age": 9413483
    },
    {
      "content": {
        "body": " * edit redaction test 4",
        "m.new_content": {
          "body": "edit redaction test 4",
          "msgtype": "m.text"
        },
        "m.relates_to": {
          "event_id": "$1562233076292452qFAkd:matrix.org",
          "rel_type": "m.replace"
        },
        "msgtype": "m.text"
      },
      "event_id": "$1562233083292473unYte:matrix.org",
      "origin_server_ts": 1562233083828,
      "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
      "sender": "@bruno4:matrix.org",
      "type": "m.room.message",
      "unsigned": {
        "age": 16601539
      },
      "user_id": "@bruno4:matrix.org",
      "age": 16601539
    },
    {
      "content": {
        "body": " * edit redaction test 1",
        "m.new_content": {
          "body": "edit redaction test 1",
          "msgtype": "m.text"
        },
        "m.relates_to": {
          "event_id": "$1562233076292452qFAkd:matrix.org",
          "rel_type": "m.replace"
        },
        "msgtype": "m.text"
      },
      "event_id": "$1562233078292457GOpvK:matrix.org",
      "origin_server_ts": 1562233078562,
      "room_id": "!RbjQlmGUZlYnyhGpoZ:matrix.org",
      "sender": "@bruno4:matrix.org",
      "type": "m.room.message",
      "unsigned": {
        "age": 16606805
      },
      "user_id": "@bruno4:matrix.org",
      "age": 16606805
    }
  ],
  "prev_batch": "1114-1006882126"
}

As a counter-example, on event $1562249046349785amNpP:matrix.org in the same room, all redactions are returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    X-Needs-InfoThis issue is blocked awaiting information from the reporterz-bug(Deprecated Label)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions