Add test template for forwarded message

This commit is contained in:
Cadence Ember 2024-10-25 16:51:20 +13:00
parent c127923f4d
commit 4167a01ed1
2 changed files with 73 additions and 0 deletions

View file

@ -1014,3 +1014,15 @@ test("message2event: @everyone within a link", async t => {
"m.mentions": {}
}])
})
test("message2event: forwarded image", async t => {
const events = await messageToEvent(data.message.forwarded_image)
t.deepEqual(events, [{
$type: "m.room.message",
msgtype: "m.text",
body: "https://github.com/@everyone",
format: "org.matrix.custom.html",
formatted_body: `<a href="https://github.com/@everyone">https://github.com/@everyone</a>`,
"m.mentions": {}
}])
})