Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Fix collapsing of separately processed events #789

Merged
merged 1 commit into from
Mar 24, 2021

Conversation

Johennes
Copy link
Contributor

As reported in element-hq/element-ios#4102, membership changes are sometimes wrongly collapsed. This happens when events of the same collapsible series are processed in different batches. For forward directed events, only the start of a collapsible series is tracked in collapsingCellDataSeriess. As a result, when the event that corresponds to the beginning of the series was processed in a preceding event batch, the series will be missing in collapsingCellDataSeriess and its summary string won't get updated.

This commit fixes the situation by adding the start of the series to collapsingCellDataSeriess when it is missing and the series is appended to.

Signed-off-by: Johannes Marbach n0-0ne+github@mailbox.org

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request updates CHANGES.rst
  • Pull request includes a sign off

As reported in element-hq/element-ios#4102, membership changes are sometimes
wrongly collapsed. This happens when events of the same collapsible series
are processed in different batches. For forward directed events, only the
start of a collapsible series is tracked in `collapsingCellDataSeriess`. As
a result, when the event that corresponds to the beginning of the series
was processed in a preceding event batch, the series will be missing in
`collapsingCellDataSeriess` and its summary string won't get updated.

This commit fixes the situation by adding the start of the series to
`collapsingCellDataSeriess` when it is missing and the series is appended
to.

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Copy link
Contributor

@manuroe manuroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @Johennes for the fix and unit tests you added for it.

@manuroe manuroe merged commit 13ed03e into matrix-org:develop Mar 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants