mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-16 05:47:09 +08:00
fix: 🚑 replace problematic attachment count (#13416)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved attachment handling in chat by updating the way attachments are counted, ensuring only files and images are included. Document attachments are no longer counted in this process. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -171,7 +171,7 @@ private extension ChatManager {
|
||||
]
|
||||
let attachmentCount = [
|
||||
editorData.fileAttachments.count,
|
||||
editorData.documentAttachments.count,
|
||||
editorData.imageAttachments.count,
|
||||
].reduce(0, +)
|
||||
let attachmentFieldName = attachmentCount > 1 && attachmentCount != 0 ? "options.blobs" : "options.blob"
|
||||
let uploadableAttachments: [GraphQLFile] = [
|
||||
|
||||
Reference in New Issue
Block a user