summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-08-23 17:30:42 +0200
committerRory& <root@rory.gay>2026-08-23 17:30:42 +0200
commitf44ace24c2665eefb6da3f4d7fddef2f0203674d (patch)
treebeb09968c86e6b959fc0ec502170310a9aff5e4c /src/api
parentStore attachment data in db (diff)
downloadserver-ts-f44ace24c2665eefb6da3f4d7fddef2f0203674d.tar.xz
Ingest cloud attachment meta
Diffstat (limited to 'src/api')
-rw-r--r--src/api/util/handlers/Message.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts

index 78bab924d..dd158bbae 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts
@@ -663,13 +663,20 @@ export async function convertCloudAttachmentToAttachment(cAtt: MessageCreateClou const cloneRespBody = (await cloneResponse.json()) as { success: boolean; new_path: string }; const realAtt = Attachment.create({ + channel_id: destinationChannelId, + message_id: destinationMessageId, + filename: attEnt.userFilename, size: attEnt.size, height: attEnt.height, width: attEnt.width, content_type: attEnt.contentType || attEnt.userOriginalContentType, - channel_id: destinationChannelId, - message_id: destinationMessageId, + + title: cAtt.title, + duration_secs: cAtt.duration_secs, + clip_created_at: cAtt.clip_created_at, + description: cAtt.description, + waveform: cAtt.waveform, }); console.log("[Message] Converted cloud attachment to", realAtt); return realAtt;