summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api/routes/channels/#channel_id/pins.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/api/routes/channels/#channel_id/pins.ts b/src/api/routes/channels/#channel_id/pins.ts

index f9586469e..96162870b 100644 --- a/src/api/routes/channels/#channel_id/pins.ts +++ b/src/api/routes/channels/#channel_id/pins.ts
@@ -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");