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

Synapse doesn't append redacts to the top level for backwards compatibility in v11/MSC2174 rooms #15823

Closed
turt2live opened this issue Jun 23, 2023 · 2 comments · Fixed by #15912
Assignees
Labels
A-Spec-Compliance places where synapse does not conform to the spec O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@turt2live
Copy link
Member

Description

matrix-org/matrix-spec-proposals#2174 describes:

For backwards-compatibility with older clients, servers should add a redacts property to the top level of m.room.redaction events in newer room versions when serving such events over the Client-Server API.

Empirically, Synapse is not doing this:

image

Events sent over /sync (and possibly /messages) are lacking the top level field.

Steps to reproduce

Create an MSC2174/MSC3820 room and redact a message.

Homeserver

t2l.io

Synapse Version

N/A

Installation Method

pip (from PyPI)

Database

PostgreSQL

Workers

Multiple workers

Platform

N/A

Configuration

No response

Relevant log output

N/A

Anything else that would be useful to know?

No response

@erikjohnston erikjohnston added T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. S-Minor Blocks non-critical functionality, workarounds exist. O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience A-Spec-Compliance places where synapse does not conform to the spec labels Jun 27, 2023
@clokep clokep self-assigned this Jul 10, 2023
@clokep
Copy link
Member

clokep commented Jul 18, 2023

I confirmed this is fixed by #15912:

{
  "type": "m.room.redaction",
  "sender": "@alice:localhost:8480",
  "content": {
    "reason": "asdf",
    "redacts": "$w0hBk82GTyF9bRg7w1HLt4iYYP41VYtuhq0UezOol0k"
  },
  "origin_server_ts": 1689683815471,
  "unsigned": {
    "age": 260863,
    "transaction_id": "m1689683815400.5"
  },
  "event_id": "$uF2gT5i6B03SdAXYlcg4FtMzDvxBRV0fRNyC2XKwYQk",
  "redacts": "$w0hBk82GTyF9bRg7w1HLt4iYYP41VYtuhq0UezOol0k"
}

@clokep
Copy link
Member

clokep commented Jul 26, 2023

I realized while writing matrix-org/matrix-spec#1604 that the MSC also says:

For improved compatibility with newer clients, servers should add a redacts property to the content of m.room.redaction events in older room versions when serving such events over the Client-Server API.

We don't do this currently and probably should.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Spec-Compliance places where synapse does not conform to the spec O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@clokep @turt2live @erikjohnston and others