Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synapse omits unsigned.membership property on events served as part of a relationship aggregation #17487

Open
richvdh opened this issue Jul 25, 2024 · 0 comments

Comments

@richvdh
Copy link
Member

richvdh commented Jul 25, 2024

The spec describes an unsigned.membership property, which SHOULD be populated for all events. (Added by MSC4115.)

It also describes an unsigned.[m.relations] property which aggregates relationships on the relevant event. The aggregation format for edits and thread threads both contain another event.

Synapse does not populate the unsigned.membership property for events served as part of such an aggregation.

This applies to at least /event, /context, /relations and /sync. (Note that /event also omits it on the top-level event: #17486.)

For example, if /sync returns an event which has been edited, I expect a response like this, but, in practice, the membership property on the inner event is absent:

{
  "type": "m.room.message",
  "sender": "@a:xps9320.sw1v.org",
  "content": { "msgtype": "m.text", "body": "def", "m.mentions": {} },
  "origin_server_ts": 1721927656960,
  "unsigned": {
    "membership": "join",
    "age": 1058542,
    "m.relations": {
      "m.replace": {
        "type": "m.room.message",
        "room_id": "!ScJmwYjNJCpEMjYXxe:xps9320.sw1v.org",
        "sender": "@a:xps9320.sw1v.org",
        "content": { 
          "msgtype": "m.text", "body": " * defg",
          "m.new_content": { "msgtype": "m.text", "body": "defg", "m.mentions": {}},
          "m.mentions": {},
          "m.relates_to": { "rel_type": "m.replace", "event_id": "$Gpy6Cs5oGKtUWeJ3OsFeDtTeAKkOYN2zzTlpbCNcy1E" }
        },
        "origin_server_ts": 1721927685762,
        "unsigned": {
          // THIS PROPERTY IS OMITTED!
          "membership": "join",
          "age": 1029740
        },
        "event_id": "$AJk4WFjN2Jw2-Z0FM0HyBRcFnhhY-z4UXMjjpOke_Wo"
      }
    }
  },
  "event_id": "$Gpy6Cs5oGKtUWeJ3OsFeDtTeAKkOYN2zzTlpbCNcy1E"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants