summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMathMan05 <mathmanrm@gmail.com>2026-03-04 16:32:20 -0600
committerRory& <root@rory.gay>2026-03-18 05:18:39 +0100
commit45f5b722176d08cdbe5fd869abe9c8478a78d4bc (patch)
treed5e47c3a91ad104de90f31f97d97d6741b0b9c56 /src
parentremove weird debugging (diff)
downloadserver-ts-45f5b722176d08cdbe5fd869abe9c8478a78d4bc.tar.xz
make better error
Diffstat (limited to 'src')
-rw-r--r--src/api/util/handlers/Message.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts

index 019fb4c0..5aa780ff 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts
@@ -107,7 +107,7 @@ function checkActionRow(row: ActionRowComponent, knownComponentIds: string[], er } } async function processMedia(media: UnfurledMediaItem, messageId: string, batchId: string, user: User, channel: Channel, id: string): Promise<(() => void) | void> { - if (Object.keys(media).length > 1) throw new HTTPError("no, you can't send those"); + if (Object.keys(media).length > 1) throw new HTTPError("Extra keys for media items are not allowed"); if (!URL.canParse(media.url)) throw new HTTPError("media URL must be a URI"); const url = new URL(media.url); if (!["http:", "https:", "attachment:"].includes(url.protocol)) throw new HTTPError("invalid media protocol");