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

MXStore: Add a method to remove all the messages sent before a specific timestamp in a room. #819

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

giomfo
Copy link
Member

@giomfo giomfo commented Apr 13, 2020

Remove all the messages sent before a specific timestamp in a room.
The state events are not removed during this operation. We keep them in the timeline.
This operation doesn't change the pagination token, and the flag indicating that the SDK has reached the end of pagination.

@giomfo giomfo requested a review from manuroe April 13, 2020 13:14
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.

We should expose this method at the MXRoom level instead of using MXStore directly.
The [MXRoom removeAllMessagesSentBefore:] should call [store commit] to be sure that the change is actually stored (and not 30s max later on the next sync).

MXRoom should also:

  • reset the room summary if needed
  • reset the current timeline (but it is probably best to do nothing at SDK level for that and let the app refresh itself)

MatrixSDK/Data/Store/MXMemoryStore/MXMemoryRoomStore.m Outdated Show resolved Hide resolved
MatrixSDK/Data/Store/MXMemoryStore/MXMemoryRoomStore.m Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants