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

Follow tombstone and predecessor history #59

Closed
1 of 6 tasks
MadLittleMods opened this issue Sep 1, 2022 · 0 comments · Fixed by #167
Closed
1 of 6 tasks

Follow tombstone and predecessor history #59

MadLittleMods opened this issue Sep 1, 2022 · 0 comments · Fixed by #167
Labels
A-archive-room-view The view to look at a room day by day in the archive T-Enhancement New feature or request

Comments

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Sep 1, 2022

Follow tombstone and predecessor history.

In order to go backwards properly:

  1. Fetch the org.matrix.msc3946.room_predecessor state event in the room (fallback to predecessor value from m.room.create state event)
  2. Do a /timestamp_to_event?dir=b&ts=<before the create event> to see if any history was imported in the room and follow that first
  3. When we exhausted the pagination of the room, go to the predecessor room

In order to go forwards properly:

  1. Fetch the m.room.tombstone state event in the room
  2. Should we display events that happened after the m.room.tombstone event? Maybe not as the room creator wishes to move to another room.
  3. If we're on a date past the m.room.tombstone event, go to the replacement_room

Do we have to worry about verifying the links here? (make sure the tombstone and predecessor point at each other)

It doesn't seem like it because the archive isn't doing any visual merging and we're just following the hints of the desired room you're viewing.

Dev notes

Test to make sure that follow logic works (see PR):

  • Paginating to the beginning of a room without a predecessor will work (just display the empty view)
    • There are already tests for this (see "Jumping forwards and backwards")
  • Paginating to the beginning of a room with a predecessor will redirect to the predecessor
  • Paginating to the beginning of a room with a predecessor and history imported before the room was created will exhaust the imported history before following the predecessor
  • Paginating to the time after the tombstone, will following the tombstone to the replacement_room

Test to make sure we can still view all of the messages in the room:

  • Test to make sure you can view messages on the day that tombstone happened
  • Test to make sure you can view the first message in the room
@MadLittleMods MadLittleMods added the T-Enhancement New feature or request label Sep 1, 2022
@MadLittleMods MadLittleMods added the A-archive-room-view The view to look at a room day by day in the archive label Oct 20, 2022
MadLittleMods added a commit that referenced this issue Apr 19, 2023
Fix #59

Other updates:

 - Update tests to use `/roomid/room1/date/2022/01/03` format instead of trying to retrofit the weird alias stuff on there. Which also makes the fancy to actual URL utilities much more simple.
 - Update to specify `archiveMessageLimit` in the test case because pages have different number of events depending on if we are against a boundary, hidden events, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-archive-room-view The view to look at a room day by day in the archive T-Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant