Merge pull request #2 from Bytedefined/patch-1

Add unpin message
This commit is contained in:
Troplo 2022-07-31 20:11:23 +10:00 committed by GitHub
commit a4e71cb412
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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({