From cf3d9e6a58bf75f65250e79e088534bbae63c7b8 Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Sun, 19 Oct 2025 19:41:17 +0200 Subject: [PATCH] fix: interaction `attachment_size_limit` field --- src/api/routes/interactions/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/routes/interactions/index.ts b/src/api/routes/interactions/index.ts index 0b34460b..1255a571 100644 --- a/src/api/routes/interactions/index.ts +++ b/src/api/routes/interactions/index.ts @@ -20,7 +20,7 @@ import { randomBytes } from "crypto"; import { InteractionSchema } from "@spacebar/schemas"; import { route } from "@spacebar/api"; import { Request, Response, Router } from "express"; -import { emitEvent, getPermission, Guild, InteractionCreateEvent, InteractionFailureEvent, InteractionType, Member, Message, Snowflake, User } from "@spacebar/util"; +import { Config, emitEvent, getPermission, Guild, InteractionCreateEvent, InteractionFailureEvent, InteractionType, Member, Message, Snowflake, User } from "@spacebar/util"; import { pendingInteractions } from "@spacebar/util/imports/Interactions"; import { InteractionCreateSchema } from "@spacebar/schemas/api/bots/InteractionCreateSchema"; @@ -52,7 +52,7 @@ router.post("/", route({}), async (req: Request, res: Response) => { version: 1, entitlements: [], authorizing_integration_owners: { "0": req.user_id }, - attachment_size_limit: 0, // TODO: add this later + attachment_size_limit: Config.get().cdn.maxAttachmentSize, }; if (body.type === InteractionType.ApplicationCommand || body.data.type === InteractionType.MessageComponent || body.data.type === InteractionType.ModalSubmit) {