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 88c1cd61..2050dd77 100644
--- a/src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts
+++ b/src/api/routes/interactions/#interaction_id/#interaction_token/callback.ts
@@ -142,7 +142,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,
@@ -161,7 +161,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 17417332..3f5067ab 100644
--- a/src/api/util/handlers/Message.ts
+++ b/src/api/util/handlers/Message.ts
@@ -348,6 +348,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
});
message.author.clean_data();
const rights = await getRights(opts.author_id);
+ message.author.clean_data();
rights.hasThrow("SEND_MESSAGES");
}
|