d->m reactions: fix sqlite parameter error

This commit is contained in:
Cadence Ember 2023-09-20 07:49:36 +12:00
parent 92dee012fc
commit 90a32225e0

View file

@ -34,7 +34,7 @@ async function addReaction(data) {
} else {
// The custom emoji is not registered. We will register it and then add it.
const mxc = await file.uploadDiscordFileToMxc(file.emoji(data.emoji.id, data.emoji.animated))
db.prepare("INSERT OR IGNORE INTO emoji (id, name, animated, mxc_url) VALUES (?, ?, ?, ?)").run(data.emoji.id, data.emoji.name, data.emoji.animated, mxc)
db.prepare("INSERT OR IGNORE INTO emoji (id, name, animated, mxc_url) VALUES (?, ?, ?, ?)").run(data.emoji.id, data.emoji.name, +!!data.emoji.animated, mxc)
key = mxc
// TODO: what happens if the matrix user also tries adding this reaction? the bridge bot isn't able to use that emoji...
}