This commit is contained in:
Troplo 2022-08-01 22:02:04 +10:00
parent 663bdf8bee
commit 75df196dae
2 changed files with 37 additions and 1 deletions

View file

@ -97,6 +97,18 @@ router.delete("/:id/:associationId", auth, async (req, res, next) => {
id: message.id id: message.id
}, },
include: [ include: [
{
model: ChatAssociation,
as: "readReceipts",
attributes: ["id"],
include: [
{
model: User,
as: "user",
attributes: ["username", "name", "avatar", "id"]
}
]
},
{ {
model: Attachment, model: Attachment,
as: "attachments" as: "attachments"
@ -343,6 +355,18 @@ router.post("/:id", auth, async (req, res, next) => {
id: message.id id: message.id
}, },
include: [ include: [
{
model: ChatAssociation,
as: "readReceipts",
attributes: ["id"],
include: [
{
model: User,
as: "user",
attributes: ["username", "name", "avatar", "id"]
}
]
},
{ {
model: Attachment, model: Attachment,
as: "attachments" as: "attachments"
@ -465,6 +489,18 @@ router.delete("/:id", auth, async (req, res, next) => {
id: message.id id: message.id
}, },
include: [ include: [
{
model: ChatAssociation,
as: "readReceipts",
attributes: ["id"],
include: [
{
model: User,
as: "user",
attributes: ["username", "name", "avatar", "id"]
}
]
},
{ {
model: Attachment, model: Attachment,
as: "attachments" as: "attachments"

View file

@ -1,5 +1,5 @@
{ {
"name": "colubrina-chat", "name": "colubrina",
"version": "1.0.11", "version": "1.0.11",
"private": true, "private": true,
"author": "Troplo <troplo@troplo.com>", "author": "Troplo <troplo@troplo.com>",