diff --git a/src/app/hooks/useCommands.ts b/src/app/hooks/useCommands.ts index a1c90f17..edd901d9 100644 --- a/src/app/hooks/useCommands.ts +++ b/src/app/hooks/useCommands.ts @@ -1331,7 +1331,14 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => { exe: async (payload) => { await mx.sendMessage(room.roomId, { msgtype: MsgType.Text, - body: payload, + body: payload + .replaceAll('
', '\n') + .replaceAll('
  • ', '\n- ') + .replaceAll( + /(.*?))"(.*?)>(?(.*?))<\/a>/g, + '[$]($)' + ) + .replaceAll(/<[^>]*>/g, ''), format: 'org.matrix.custom.html', formatted_body: payload, });