From 38b834f7e95026a9d4e5760ff9f5606fc035652f Mon Sep 17 00:00:00 2001 From: Will Hunt <will@half-shot.uk> Date: Tue, 13 Feb 2018 20:12:04 +0000 Subject: [PATCH] Revert "Don't format markdown if the body is plain" This reverts commit 23adab0d9a980849d848cc0ff253f4dead2453eb. --- src/bot.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bot.ts b/src/bot.ts index 51237ec..f4529d7 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -155,7 +155,7 @@ export class DiscordBot { } public MatrixEventToEmbed(event: any, profile: any, channel: Discord.TextChannel): Discord.RichEmbed { - let body = this.config.bridge.disableDiscordMentions ? event.content.body : + const body = this.config.bridge.disableDiscordMentions ? event.content.body : this.msgProcessor.FindMentionsInPlainBody( event.content.body, channel.members.array(), @@ -166,6 +166,7 @@ export class DiscordBot { const mxClient = this.bridge.getClientFactory().getClientAs(); profile.avatar_url = mxClient.mxcUrlToHttp(profile.avatar_url); } + /* See issue #82 const isMarkdown = (event.content.format === "org.matrix.custom.html"); if (!isMarkdown) { body = "\\" + body; @@ -173,6 +174,7 @@ export class DiscordBot { if (event.content.msgtype === "m.emote") { body = `*${body}*`; } + */ return new Discord.RichEmbed({ author: { name: profile.displayname, -- GitLab