mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-26 10:57:31 +00:00
add author to query in pins API
This commit is contained in:
@@ -49,6 +49,7 @@ router.put(
|
||||
|
||||
const message = await Message.findOneOrFail({
|
||||
where: { id: message_id },
|
||||
relations: ["author"],
|
||||
});
|
||||
|
||||
// * in dm channels anyone can pin messages -> only check for guilds
|
||||
@@ -133,6 +134,7 @@ router.delete(
|
||||
|
||||
const message = await Message.findOneOrFail({
|
||||
where: { id: message_id },
|
||||
relations: ["author"],
|
||||
});
|
||||
|
||||
if (message.guild_id) req.permission?.hasThrow("MANAGE_MESSAGES");
|
||||
|
||||
Reference in New Issue
Block a user