[WIP] threads. #74
1 changed files with 2 additions and 3 deletions
Nevermind, Commet is *just broken* when it comes to threads.
It refuses to render the 1st message of a thread, whether it's an emote, or anything else. COMMET, *WHY?* Anyway, I don't think it makes sense to add extra accommodation to what's clearly a client-level bug. So emotes are back, yay!
commit
17cc56299d
|
|
@ -31,9 +31,8 @@ async function threadToAnnouncement(parentRoomID, threadRoomID, creatorMxid, thr
|
||||||
context["m.relates_to"] = {"m.in_reply_to": {event_id: event.event_id}, is_falling_back:false, event_id: event.event_id, rel_type: "m.thread"}
|
context["m.relates_to"] = {"m.in_reply_to": {event_id: event.event_id}, is_falling_back:false, event_id: event.event_id, rel_type: "m.thread"}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Wait until certain clients (*cough* Commet *cough*) figure out how to render an m.emote in a thread, and then simplify this to creatorMxid ? "m.emote" : "m.text" and creatorMxid ? "started a thread called" : "New thread started:"
|
const msgtype = creatorMxid ? "m.emote" : "m.text"
|
||||||
const msgtype = creatorMxid && !branchedFromEventID ? "m.emote" : "m.text"
|
const template = creatorMxid ? "started a thread called" : "New thread started:"
|
||||||
const template = creatorMxid ? `${branchedFromEventID ? `${creatorMxid} ` : ""}started a thread called` : "New thread started:"
|
|
||||||
const via = await mxUtils.getViaServersQuery(threadRoomID, di.api)
|
const via = await mxUtils.getViaServersQuery(threadRoomID, di.api)
|
||||||
let body = `${template} \"${thread.name}\" in room: https://matrix.to/#/${threadRoomID}?${via.toString()}${suffix}`
|
let body = `${template} \"${thread.name}\" in room: https://matrix.to/#/${threadRoomID}?${via.toString()}${suffix}`
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue