From 75df196dae6124725efc8e2e9cb8022b17aa549e Mon Sep 17 00:00:00 2001 From: Troplo Date: Mon, 1 Aug 2022 22:02:04 +1000 Subject: [PATCH] fix --- backend/routes/associations.js | 36 ++++++++++++++++++++++++++++++++++ frontend/package.json | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/backend/routes/associations.js b/backend/routes/associations.js index c6710a3..3202a3d 100644 --- a/backend/routes/associations.js +++ b/backend/routes/associations.js @@ -97,6 +97,18 @@ router.delete("/:id/:associationId", auth, async (req, res, next) => { id: message.id }, include: [ + { + model: ChatAssociation, + as: "readReceipts", + attributes: ["id"], + include: [ + { + model: User, + as: "user", + attributes: ["username", "name", "avatar", "id"] + } + ] + }, { model: Attachment, as: "attachments" @@ -343,6 +355,18 @@ router.post("/:id", auth, async (req, res, next) => { id: message.id }, include: [ + { + model: ChatAssociation, + as: "readReceipts", + attributes: ["id"], + include: [ + { + model: User, + as: "user", + attributes: ["username", "name", "avatar", "id"] + } + ] + }, { model: Attachment, as: "attachments" @@ -465,6 +489,18 @@ router.delete("/:id", auth, async (req, res, next) => { id: message.id }, include: [ + { + model: ChatAssociation, + as: "readReceipts", + attributes: ["id"], + include: [ + { + model: User, + as: "user", + attributes: ["username", "name", "avatar", "id"] + } + ] + }, { model: Attachment, as: "attachments" diff --git a/frontend/package.json b/frontend/package.json index 7f9f42f..5d2bfd5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,5 +1,5 @@ { - "name": "colubrina-chat", + "name": "colubrina", "version": "1.0.11", "private": true, "author": "Troplo ",