Skip to content

Commit

Permalink
Fix formatting, where attachments where sent as a list of dict object…
Browse files Browse the repository at this point in the history
…, instead of Int array...
  • Loading branch information
wqyeo committed Mar 30, 2024
1 parent d5c0ce3 commit e939705
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions SpyGamersApi/src/controllers/groups/sendMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
Expand Down

0 comments on commit e939705

Please sign in to comment.