summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathMan05 <mathmanrm@gmail.com>2026-03-04 16:05:42 -0600
committerRory& <root@rory.gay>2026-03-18 05:18:39 +0100
commite21c0c3eec314b3c85b66dfe93c1125226ef439c (patch)
treee31ae6621e68e5e98f1630289742515a827d6f03
parentremove log (diff)
downloadserver-ts-e21c0c3eec314b3c85b66dfe93c1125226ef439c.tar.xz
fixes
-rw-r--r--src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts4
-rw-r--r--src/api/util/handlers/Message.ts1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts b/src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts

index 5a8bec01..d9af7363 100644 --- a/src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts +++ b/src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts
@@ -128,7 +128,7 @@ router.post("/", route({}), async (req: Request, res: Response) => { return; case InteractionCallbackType.UPDATE_MESSAGE: { - if (!interaction.mesageId) throw new HTTPError("no. That was not a message"); + if (!interaction.messageId) throw new HTTPError("no. That was not a message"); const message = await Message.findOneOrFail({ relations: { author: true, @@ -147,7 +147,7 @@ router.post("/", route({}), async (req: Request, res: Response) => { channel: true, }, where: { - id: interaction.mesageId, + id: interaction.messageId, }, }); if (body.data.content && body.data.content.length > Config.get().limits.message.maxCharacters) { diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts
index a448cf4a..c59e403a 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts
@@ -347,6 +347,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> { where: { id: opts.author_id }, }); const rights = await getRights(opts.author_id); + message.author.clean_data(); rights.hasThrow("SEND_MESSAGES"); }