forked from cadence/out-of-your-element
Split part and reaction_part
Now, reactions should always end up on the bottom of a message group, instead of sometimes being in the middle.
This commit is contained in:
parent
b7f90db20a
commit
c24752625d
13 changed files with 121 additions and 71 deletions
|
@ -16,7 +16,7 @@ const emoji = sync.require("../converters/emoji")
|
|||
async function addReaction(event) {
|
||||
const channelID = select("channel_room", "channel_id", {room_id: event.room_id}).pluck().get()
|
||||
if (!channelID) return // We just assume the bridge has already been created
|
||||
const messageID = select("event_message", "message_id", {event_id: event.content["m.relates_to"].event_id, part: 0}).pluck().get() // 0 = primary
|
||||
const messageID = select("event_message", "message_id", {event_id: event.content["m.relates_to"].event_id}, "ORDER BY reaction_part").pluck().get()
|
||||
if (!messageID) return // Nothing can be done if the parent message was never bridged.
|
||||
|
||||
const key = event.content["m.relates_to"].key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue