WIP: feature: threads'n'forums #74
1 changed files with 2 additions and 1 deletions
|
|
@ -244,7 +244,7 @@ async event => {
|
|||
}))
|
||||
|
||||
/**
|
||||
* @param {Ty.Event.Outer_M_Room_Message | Ty.Event.Outer_M_Room_Message_File} event Used for determining the branching-point and the title; its room_id will mutate to the target thread-room, if one gets created.
|
||||
* @param {Ty.Event.Outer_M_Room_Message | Ty.Event.Outer_M_Room_Message_File} event Used for determining the branching-point and the title; any relation data will be stripped and its room_id will mutate to the target thread-room, if one gets created.
|
||||
* @returns {Promise<boolean>} whether a thread-room was created
|
||||
*/
|
||||
async function bridgeThread(event) {
|
||||
|
|
@ -265,6 +265,7 @@ async function bridgeThread(event) {
|
|||
name = name.length < 100 ? name.replaceAll("\n", " ") : name.slice(0, 96).replaceAll("\n", " ") + "..."
|
||||
|
||||
event.room_id = await createRoom.ensureRoom((await discord.snow.channel.createThreadWithMessage(channelID, messageID, {name})).id)
|
||||
event.content["m.relates_to"] = undefined;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue