Skip to content

Follow tombstone and predecessor history #59

@MadLittleMods

Description

@MadLittleMods

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-archive-room-viewThe view to look at a room day by day in the archiveT-EnhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions