Change sticker URL and stream response

This commit is contained in:
Cadence Ember
2026-02-25 18:21:35 +13:00
parent 9b3707baa1
commit d1aa8f01e7
3 changed files with 23 additions and 43 deletions
+3 -9
View File
@@ -631,17 +631,11 @@ async function eventToMessage(event, guild, channel, di) {
}
if (event.type === "m.sticker") {
content = ""
content += `[${event.content.body}](` // sticker title for fallback if the url preview fails
const afterLink = ")"
// Make sticker URL params
const params = new URLSearchParams()
const withoutMxc = mxUtils.makeMxcPublic(event.content.url)
assert(withoutMxc)
params.append("mxc", withoutMxc)
const url = `${reg.ooye.bridge_origin}/download/sticker.webp?${params.toString()}`
content += url + afterLink
const url = `${reg.ooye.bridge_origin}/download/sticker/${withoutMxc}/_.webp`
content = `[${event.content.body || "\u2800"}](${url})`
} else if (event.type === "org.matrix.msc3381.poll.start") {
const pollContent = event.content["org.matrix.msc3381.poll.start"] // just for convenience
const isClosed = false;