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:
Cadence Ember 2023-10-14 22:08:10 +13:00
commit c24752625d
13 changed files with 121 additions and 71 deletions

View file

@ -21,7 +21,7 @@ async function addReaction(data) {
const user = data.member?.user
assert.ok(user && user.username)
const parentID = select("event_message", "event_id", {message_id: data.message_id, part: 0}).pluck().get() // 0 = primary
const parentID = select("event_message", "event_id", {message_id: data.message_id, reaction_part: 0}).pluck().get()
if (!parentID) return // Nothing can be done if the parent message was never bridged.
assert.equal(typeof parentID, "string")