-
-
Notifications
You must be signed in to change notification settings - Fork 592
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
Include redundant members in most timeline filters #4329
base: develop
Are you sure you want to change the base?
Include redundant members in most timeline filters #4329
Conversation
Synapse never tries to avoid redundant members anyway, so it's hard to ensure that it works correctly (https://github.com/element-hq/synapse/blob/568051c0f07393b786b9d813a1db53dd332c9fc2/synapse/handlers/pagination.py#L639) It also seems like it would be difficult when the "Show current profile picture and name for users in message history" option is turned off Conduwuit and Dendrite do attempt to remove redundant members, and it seems to cause some problems, so this commit tells them to include redundant members Similar to element-hq/element-web#7417, which is also why there might still be missing profiles in rare cases after this Signed-off-by: morguldir <[email protected]>
I believe this will have a lack of migration problem, changing filters with an existing sync token is not explicitly supported within the spec |
This matrix-org/matrix-spec#1304? My intuition says that it would be fine in this case, since it only changes the returned state and not timeline events themselves 🤔 |
Signed-off-by: morguldir <[email protected]>
This doesn't sound like a thing we need though, even if changing the filter mid-sync-stream is fine. js-sdk clients do remember memberships. |
That's true, but an older event obtained via scrollback will probably have a different state, and this might to be why element-web expects the state to be included, I'm not totally sure how else a client would implement historically accurate memberships in messages anyway But perhaps it would be better to make this an option that e.g. the react-sdk would set if |
I think this could do with an integ test which demonstrates that edge, rather than just testing the right params are sent |
Hopefully that roughly demonstrates it |
see: - matrix-org/matrix-js-sdk#4329 - https://github.com/element-hq/synapse/blob/568051c0f07393b786b9d813a1db53dd332c9fc2/synapse/handlers/pagination.py#L639 - https://matrix.to/#/!n8DKU1BeeJilOJXDPr:seirdy.one/$gvGF7GuPrLPR8nHg4UiHvP-ZVwuiMkYS8O6VlsDCW9w?via=awawawawawawawawawawawawawawawawawawawawawawawawawawawawawawaw.gay&via=transfem.dev&via=matrix.org Signed-off-by: strawberry <[email protected]>
see: - matrix-org/matrix-js-sdk#4329 - https://github.com/element-hq/synapse/blob/568051c0f07393b786b9d813a1db53dd332c9fc2/synapse/handlers/pagination.py#L639 - https://matrix.to/#/!n8DKU1BeeJilOJXDPr:seirdy.one/$gvGF7GuPrLPR8nHg4UiHvP-ZVwuiMkYS8O6VlsDCW9w?via=awawawawawawawawawawawawawawawawawawawawawawawawawawawawawawaw.gay&via=transfem.dev&via=matrix.org Signed-off-by: strawberry <[email protected]>
see: - matrix-org/matrix-js-sdk#4329 - https://github.com/element-hq/synapse/blob/568051c0f07393b786b9d813a1db53dd332c9fc2/synapse/handlers/pagination.py#L639 - https://matrix.to/#/!n8DKU1BeeJilOJXDPr:seirdy.one/$gvGF7GuPrLPR8nHg4UiHvP-ZVwuiMkYS8O6VlsDCW9w?via=awawawawawawawawawawawawawawawawawawawawawawawawawawawawawawaw.gay&via=transfem.dev&via=matrix.org Signed-off-by: strawberry <[email protected]>
see: - matrix-org/matrix-js-sdk#4329 - https://github.com/element-hq/synapse/blob/568051c0f07393b786b9d813a1db53dd332c9fc2/synapse/handlers/pagination.py#L639 - https://matrix.to/#/!n8DKU1BeeJilOJXDPr:seirdy.one/$gvGF7GuPrLPR8nHg4UiHvP-ZVwuiMkYS8O6VlsDCW9w?via=awawawawawawawawawawawawawawawawawawawawawawawawawawawawawawaw.gay&via=transfem.dev&via=matrix.org Signed-off-by: strawberry <[email protected]>
Your tests don't look to be passing |
Indeed, i swear they passed locally earlier 😔 Maybe it requires a bit more pagination for the bug to appear |
see: - matrix-org/matrix-js-sdk#4329 - https://github.com/element-hq/synapse/blob/568051c0f07393b786b9d813a1db53dd332c9fc2/synapse/handlers/pagination.py#L639 - https://matrix.to/#/!n8DKU1BeeJilOJXDPr:seirdy.one/$gvGF7GuPrLPR8nHg4UiHvP-ZVwuiMkYS8O6VlsDCW9w?via=awawawawawawawawawawawawawawawawawawawawawawawawawawawawawawaw.gay&via=transfem.dev&via=matrix.org Signed-off-by: strawberry <[email protected]>
see: - matrix-org/matrix-js-sdk#4329 - https://github.com/element-hq/synapse/blob/568051c0f07393b786b9d813a1db53dd332c9fc2/synapse/handlers/pagination.py#L639 - https://matrix.to/#/!n8DKU1BeeJilOJXDPr:seirdy.one/$gvGF7GuPrLPR8nHg4UiHvP-ZVwuiMkYS8O6VlsDCW9w?via=awawawawawawawawawawawawawawawawawawawawawawawawawawawawawawaw.gay&via=transfem.dev&via=matrix.org Signed-off-by: strawberry <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@morguldir are you still working on this? We'll need the tests to pass before it can land, obviously.
@@ -74,6 +74,11 @@ export class Filter { | |||
lazy_load_members: true, | |||
}; | |||
|
|||
public static LAZY_LOADING_MESSAGES_REDUNDANT_FILTER = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things exported in the public API should have documentation
Synapse never tries to avoid redundant members anyway, so it's hard to ensure that it works correctly (https://github.com/element-hq/synapse/blob/568051c0f07393b786b9d813a1db53dd332c9fc2/synapse/handlers/pagination.py#L639)
It also seems like it would be difficult when the "Show current profile picture and name for users in message history" option is turned off
Conduwuit and Dendrite do attempt to remove redundant members, and it seems to cause some problems, so this commit tells them to include redundant members
Similar to element-hq/element-web#7417, which is also why there might still be missing data in rare cases after this
element-web notes: Fix some cases where profiles would be missing when using conduwuit or dendrite
Signed-off-by: morguldir [email protected]
Checklist
public
/exported
symbols have accurate TSDoc documentation.