Commit 1ec4e0a7 authored by Christopher Davis's avatar Christopher Davis Committed by Daniel Garcia Moreno

Stop checking for markdown if message is an emote

parent 7051a65d
......@@ -1377,8 +1377,12 @@ impl AppOp {
let md_parsed_msg = markdown_to_html(&msg, &ComrakOptions::default());
if md_parsed_msg.replace("<p>","").replace("</p>","") != msg.clone() + "\n" {
m.formatted_body = Some(md_parsed_msg);
m.format = Some(String::from("org.matrix.custom.html"));
// Riot does not properly show emotes with Markdown;
// Emotes with markdown have a newline after the username
if m.mtype != "m.emote" {
m.formatted_body = Some(md_parsed_msg);
m.format = Some(String::from("org.matrix.custom.html"));
}
}
self.add_tmp_room_message(m.clone());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment