支持加密图片与视频的本机预览

This commit is contained in:
xhgit committed 2026-11-13 23:41:56 +08:00
1 parent 87676ae983
commit 6b728a0996
10 files changed
+94 -7

No files matched your search

+2 -1
View File
@@ -266,7 +266,8 @@ export async function forwardMessage(identity: ChatIdentity, line: ChatLine, rec
if (line.recalled) throw new Error('撤回的消息无法转发')
const attachment = line.attachment
const bytes = attachment ? await readAttachment(attachment, call) : undefined
const content = attachment && bytes ? attachment.voice ? voiceFile([bytes]) : new File([bytes], attachment.name) : line.text
const content = attachment && bytes ? attachment.voice ? voiceFile([bytes]) :
new File([bytes], attachment.name, { type: attachment.media }) : line.text
await send(identity, recipient, device, content, call)
}