diff --git a/SpyGamersApi/src/controllers/groups/sendMessage.ts b/SpyGamersApi/src/controllers/groups/sendMessage.ts index 0b017fd..e046274 100644 --- a/SpyGamersApi/src/controllers/groups/sendMessage.ts +++ b/SpyGamersApi/src/controllers/groups/sendMessage.ts @@ -131,7 +131,8 @@ export const sendGroupMessage = async (request: FastifyRequest, reply: FastifyRe // No attachments included, end. const result= { message_id: groupMessageID, - timestamp: newGroupMessage.timestamp + timestamp: newGroupMessage.timestamp, + attachment_ids: [] } _getRandomBotToReply(prisma, group_id_int, content); @@ -154,10 +155,7 @@ export const sendGroupMessage = async (request: FastifyRequest, reply: FastifyRe if (storeSuccess) { - const attachment_ids = storeResults.map(storeRes => ({ - id: storeRes.attachmentID - })); - + const attachment_ids: number[] = storeResults.map(storeRes => storeRes.attachmentID); const result= { message_id: groupMessageID, timestamp: newGroupMessage.timestamp,