diff --git a/backend/routes/communications.js b/backend/routes/communications.js index d40e27d..0930ecb 100644 --- a/backend/routes/communications.js +++ b/backend/routes/communications.js @@ -615,6 +615,13 @@ router.post("/:id/pins", auth, async (req, res, next) => { res.json({ message: "Message unpinned successfully." }) + await createMessage( + req, + "pin", + `${req.user.username} unpinned a message from the chat.`, + chat, + req.user.id + ) return } const pin = await Pin.create({