Skip to content

Conversation

@VAWVAW
Copy link
Contributor

@VAWVAW VAWVAW commented Jun 4, 2025

This saves replacement/edit events in two places:

  1. In RoomInfo::message with a new message type.
    This is needed for read receipts on edits and redaction of edits to work.
  2. In Message::event for MessageEvent::Original and MessageEvent::Local (though I'm not sure whether a local event could get edited).
    This allows every access to the message body to be replaced by an access to the newest edit.
    If an edit is redacted, it is simply removed from this list.

In case the edit event is loaded before the message itself, it is saved to RoomInfo::unloaded_edits.

possible future additions

  • The function msg_not_hidden in src/windows/room/scrollback.rs is used to hide the edit events from the timeline and could be extended to hide other kinds of events.
  • The edit history could be exposed to the user with a command like :edits, making it possible to view and redact edit events.

fixes #431

@VAWVAW VAWVAW force-pushed the edit-history branch 2 times, most recently from 47ca665 to 313b692 Compare October 26, 2025 12:15
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.

Old edits are not shown

1 participant