mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 20:32:50 +02:00
Add reaction viewer to right click menu
This commit is contained in:
parent
a2e3f06e8e
commit
62edffbae0
4 changed files with 87 additions and 10 deletions
|
@ -23,16 +23,7 @@ async function removeSomeReactions(data) {
|
|||
const eventIDForMessage = select("event_message", "event_id", {message_id: data.message_id, reaction_part: 0}).pluck().get()
|
||||
if (!eventIDForMessage) return
|
||||
|
||||
/** @type {Ty.Event.Outer<Ty.Event.M_Reaction>[]} */
|
||||
let reactions = []
|
||||
/** @type {string | undefined} */
|
||||
let nextBatch = undefined
|
||||
do {
|
||||
/** @type {Ty.Pagination<Ty.Event.Outer<Ty.Event.M_Reaction>>} */
|
||||
const res = await api.getRelations(roomID, eventIDForMessage, {from: nextBatch}, "m.annotation")
|
||||
reactions = reactions.concat(res.chunk)
|
||||
nextBatch = res.next_batch
|
||||
} while (nextBatch)
|
||||
const reactions = await api.getFullRelations(roomID, eventIDForMessage, "m.annotation")
|
||||
|
||||
// Run the proper strategy and any strategy-specific database changes
|
||||
const removals = await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue