sending events in matrix
This commit is contained in:
parent
6990957c9e
commit
8a0c2b5663
13 changed files with 2764 additions and 10 deletions
|
@ -6,21 +6,21 @@ const markdown = require("discord-markdown")
|
|||
* @param {import("discord-api-types/v10").APIMessage} message
|
||||
* @returns {import("../../types").M_Room_Message_content}
|
||||
*/
|
||||
module.exports = function(message) {
|
||||
module.exports = function messageToEvent(message) {
|
||||
const body = message.content
|
||||
const html = markdown.toHTML(body, {
|
||||
discordCallback: {
|
||||
/* discordCallback: {
|
||||
user: Function,
|
||||
channel: Function,
|
||||
role: Function,
|
||||
everyone: Function,
|
||||
here: Function
|
||||
}
|
||||
} */
|
||||
}, null, null)
|
||||
return {
|
||||
msgtype: "m.text",
|
||||
body: body,
|
||||
format: "m.custom.html",
|
||||
format: "org.matrix.custom.html",
|
||||
formatted_body: html
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue