Fall back to showing body for unknown message types (#496)
This commit is contained in:
@@ -573,20 +573,7 @@ fn body_cow_content(content: &RoomMessageEventContent) -> Cow<'_, str> {
|
|||||||
MessageType::Video(content) => {
|
MessageType::Video(content) => {
|
||||||
display_file_to_text!(Video, content);
|
display_file_to_text!(Video, content);
|
||||||
},
|
},
|
||||||
_ => {
|
_ => content.body(),
|
||||||
match content.msgtype() {
|
|
||||||
// Just show the body text for the special Element messages.
|
|
||||||
"nic.custom.confetti" |
|
|
||||||
"nic.custom.fireworks" |
|
|
||||||
"io.element.effect.hearts" |
|
|
||||||
"io.element.effect.rainfall" |
|
|
||||||
"io.element.effect.snowfall" |
|
|
||||||
"io.element.effects.space_invaders" => content.body(),
|
|
||||||
other => {
|
|
||||||
return Cow::Owned(format!("[Unknown message type: {other:?}]"));
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Cow::Borrowed(s)
|
Cow::Borrowed(s)
|
||||||
|
|||||||
Reference in New Issue
Block a user