Commit 745f547904

745f547904de0c2cbd4c488eb374ab92ca80a12a

parent: 6ebb7ac7fd

Unregistered key

vaw <git@nlih.de> · 2025-09-03 05:02 UTC
committer: <noreply@github.com>

Fall back to showing body for unknown message types (#496)

Layout: unified · split

src/message/mod.rs +1 −14
@@ -573,20 +573,7 @@ fn body_cow_content(content: &RoomMessageEventContent) -> Cow<'_, str> {
573573 MessageType::Video(content) => {
574574 display_file_to_text!(Video, content);
575575 },
576 _ => {
577 match content.msgtype() {
578 // Just show the body text for the special Element messages.
579 "nic.custom.confetti" |
580 "nic.custom.fireworks" |
581 "io.element.effect.hearts" |
582 "io.element.effect.rainfall" |
583 "io.element.effect.snowfall" |
584 "io.element.effects.space_invaders" => content.body(),
585 other => {
586 return Cow::Owned(format!("[Unknown message type: {other:?}]"));
587 },
588 }
589 },
576 _ => content.body(),
590577 };
591578
592579 Cow::Borrowed(s)