feat(ui): add custom event content to timeline items#6450
Draft
niclashoyer wants to merge 1 commit into
Draft
Conversation
Signed-off-by: Niclas Hoyer <info@niclashoyer.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the actual raw event to
OtherMessageLiketimeline events, so that it is possible to decode the custom events and display them in clients that use the ui/timeline api.I did not document this for now or add new tests, as I'm looking for feedback first. As this is my first contribution to this crate, I'd like to clarify if this approach is the right thing to do, or if there is a more idiomatic way to pass down raw ruma events.
With this change the usual case does not change. To actually retrieve the custom events in the timeline the timeline event filter needs to be changed from the default to include wanted custom events. Now if the timeline contains a custom (remote) event, the raw event is cloned and passed to the client as a field in
OtherMessageLike. For local events this is not supported right now.Example usage to decode custom events (kinda pseudo code):
cc #6177
CHANGELOG.mdfiles.