From aab76a4464c821250a898d34209b199d5797e6ee Mon Sep 17 00:00:00 2001 From: Sorunome <mail@sorunome.de> Date: Sat, 11 May 2019 11:36:33 +0200 Subject: [PATCH] parse stuffs to html for matrix --- src/matrixcommandhandler.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/matrixcommandhandler.ts b/src/matrixcommandhandler.ts index 0660d33..6c902bf 100644 --- a/src/matrixcommandhandler.ts +++ b/src/matrixcommandhandler.ts @@ -22,6 +22,7 @@ import { IMatrixEvent } from "./matrixtypes"; import { Provisioner } from "./provisioner"; import { Util, ICommandActions, ICommandParameters, CommandPermissonCheck } from "./util"; import * as Discord from "discord.js"; +import * as markdown from "discord-markdown"; const log = new Log("MatrixCommandHandler"); /* tslint:disable:no-magic-numbers */ @@ -187,9 +188,12 @@ export class MatrixCommandHandler { }; const reply = await Util.ParseCommand("!discord", event.content!.body!, actions, parameters, permissionCheck); + const formattedReply = markdown.toHTML(reply); await this.bridge.getIntent().sendMessage(event.room_id, { body: reply, + format: "org.matrix.custom.html", + formatted_body: formattedReply, msgtype: "m.notice", }); } -- GitLab