ruwuma/crates/ruma-events/src/doc/rich_reply.md
Jonas Platte 31331f3165
Bring back ruma-events
Co-authored-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-08-28 10:23:54 +02:00

923 B

This function requires an [OriginalRoomMessageEvent] since it creates a permalink to the previous message, for which the room ID is required. If you want to reply to an [OriginalSyncRoomMessageEvent], you have to convert it first by calling [.into_full_event()][crate::OriginalSyncMessageLikeEvent::into_full_event].

If the message was edited, the previous message should be the original message that was edited, with the content of its replacement, to allow the fallback to be accurate at the time it is added.

It is recommended to enable the html feature when using this method as this will clean up nested rich reply fallbacks in chains of replies. This uses [sanitize_html()] internally, with [RemoveReplyFallback::Yes].