Spoiler Fix #90

Manually merged
cadence merged 11 commits from Guzio/out-of-your-element:spoilerfix into main 2026-10-20 12:45:17 +00:00
Showing only changes of commit 966095c361 - Show all commits

of course, I fucked up where the / goes...

Guzio 2026-10-19 13:57:48 +02:00

View file

@ -144,7 +144,7 @@ function getPublicUrlForCdn(url, spoiler="") {
const unsignedHash = hasher.h64(match[3]) // attachment ID const unsignedHash = hasher.h64(match[3]) // attachment ID
const signedHash = unsignedHash - 0x8000000000000000n // shifting down to signed 64-bit range const signedHash = unsignedHash - 0x8000000000000000n // shifting down to signed 64-bit range
db.prepare("INSERT OR IGNORE INTO media_proxy (permitted_hash) VALUES (?)").run(signedHash) db.prepare("INSERT OR IGNORE INTO media_proxy (permitted_hash) VALUES (?)").run(signedHash)
return `${reg.ooye.bridge_origin}/download/discord${match[1]}${spoiler}/${match[2]}/${match[3]}/${match[4]}` return `${reg.ooye.bridge_origin}/download/discord${match[1]}/${spoiler}${match[2]}/${match[3]}/${match[4]}`
} }
/** /**