forked from cadence/out-of-your-element
Fix emoji_id references and add tests
This commit is contained in:
parent
9fbef15ad1
commit
e3b2c844d8
8 changed files with 77 additions and 19 deletions
|
@ -29,7 +29,7 @@ async function emojisToState(emojis) {
|
|||
},
|
||||
url
|
||||
}
|
||||
db.prepare("INSERT OR IGNORE INTO emoji (id, name, animated, mxc_url) VALUES (?, ?, ?, ?)").run(emoji.id, emoji.name, +!!emoji.animated, url)
|
||||
db.prepare("INSERT OR IGNORE INTO emoji (emoji_id, name, animated, mxc_url) VALUES (?, ?, ?, ?)").run(emoji.id, emoji.name, +!!emoji.animated, url)
|
||||
}).catch(e => {
|
||||
if (e.data.errcode === "M_TOO_LARGE") { // Very unlikely to happen. Only possible for 3x-series emojis uploaded shortly after animated emojis were introduced, when there was no 256 KB size limit.
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue