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

redundant top-level membership field in m.room.member events #6226

Open
hugecheese opened this issue Oct 20, 2019 · 1 comment
Open

redundant top-level membership field in m.room.member events #6226

hugecheese opened this issue Oct 20, 2019 · 1 comment
Labels
A-Spec-Compliance places where synapse does not conform to the spec O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. X-Consult-Clients Need to investigate if this change breaks clients

Comments

@hugecheese
Copy link

hugecheese commented Oct 20, 2019

When doing an initial /sync, the matrix.org homeserver returned the following event:

{
  "content": {
    "avatar_url": "mxc://t2bot.io/07d8a5673f277eb13a7ceb68bc554fef",
    "displayname": "pad (Telegram)",
    "membership": "join"
  },
  "event_id": "$154217899961853PiOIa:t2bot.io",
  "membership": "join",
  "origin_server_ts": 1542178999598,
  "sender": "@telegram_727304627:t2bot.io",
  "state_key": "@telegram_727304627:t2bot.io",
  "type": "m.room.member",
  "unsigned": {
    "age": 29364346302
  }
}

This is a State Event. For some reason, it has both a top-level membership field (which it probably shouldn't?), and one inside the content (as required by the spec).

This is particularly strange because in almost all m.room.member events this will not occur, but it sometimes does, returning two membership fields rather than one. This is harmless for clients, but there may be some underlying bug in synapse?

@hugecheese hugecheese changed the title Same field occasionally present twice from '/sync Same field occasionally present twice from /sync Oct 20, 2019
@richvdh richvdh changed the title Same field occasionally present twice from /sync redundant top-level membership field in m.room.member events Oct 21, 2019
@richvdh
Copy link
Member

richvdh commented Oct 21, 2019

I thought we had an open issue for this, but I can't find it.

It's not an underlying bug: the field used to live at the top level, and when we moved it into content, we added some code to copy it to the top level for compatibility with older clients.

We should get rid of it though.

@neilisfragile neilisfragile added maintenance z-p2 (Deprecated Label) labels Oct 29, 2019
@DMRobertson DMRobertson added A-Spec-Compliance places where synapse does not conform to the spec S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. O-Uncommon Most users are unlikely to come across this or unexpected workflow X-Consult-Clients Need to investigate if this change breaks clients and removed z-p2 (Deprecated Label) z-maintenance labels Aug 25, 2022
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-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. X-Consult-Clients Need to investigate if this change breaks clients
Projects
None yet
Development

No branches or pull requests

4 participants