mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-14 13:20:32 +00:00
fixes
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user