finally got the thread's early messages working

This commit is contained in:
Cadence Ember 2023-08-21 23:31:40 +12:00
parent 180708b60e
commit 6d1635539b
11 changed files with 321 additions and 32 deletions

View file

@ -341,3 +341,25 @@ test("message2event: type 4 channel name change", async t => {
formatted_body: "changed the channel name to <strong>worming</strong>"
}])
})
test("message2event: thread start message reference", async t => {
const events = await messageToEvent(data.special_message.thread_start_context, data.guild.general, {}, {
api: {
getEvent: mockGetEvent(t, "!PnyBKvUBOhjuCucEfk:cadence.moe", "$FchUVylsOfmmbj-VwEs5Z9kY49_dt2zd0vWfylzy5Yo", {
"type": "m.room.message",
"sender": "@_ooye_cadence:cadence.moe",
"content": {
"m.mentions": {},
"msgtype": "m.text",
"body": "layer 4"
}
})
}
})
t.deepEqual(events, [{
$type: "m.room.message",
msgtype: "m.text",
body: "layer 4",
"m.mentions": {}
}])
})