Skip to content

Commit f0dbf6f

Browse files
handleMessage: set message id for cloud attachments
1 parent f410a90 commit f0dbf6f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/api/util/handlers/Message.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
346346
components: opts.components ?? undefined, // Fix Discord-Go?
347347
});
348348
message.channel = channel;
349+
message.attachments?.forEach((att) => {
350+
att.message_id = message.id;
351+
att.save();
352+
});
349353

350354
if (opts.author_id) {
351355
message.author = await User.findOneOrFail({

0 commit comments

Comments
 (0)