attachment: fix over reliance on fileType() #3479

Merged
hj merged 4 commits from Yonle/pleroma-fe:filetypeservice-1 into develop 2026-03-04 18:41:30 +00:00
Member

also fixes:

  • bluesky/bridgy attachment not being shown properly (eg, image and video being treated as file due to mimetype)
also fixes: - bluesky/bridgy attachment not being shown properly (eg, image and video being treated as file due to mimetype)
Signed-off-by: Yonle <yonle@proton.me>
Yonle changed title from attachment: fix over reliance on fileType() to WIP: attachment: fix over reliance on fileType() 2026-02-27 14:37:18 +00:00
Yonle changed title from WIP: attachment: fix over reliance on fileType() to attachment: fix over reliance on fileType() 2026-02-27 15:15:21 +00:00
hj requested changes 2026-03-02 21:16:39 +00:00
@ -64,3 +63,1 @@
img:
fileTypeService.fileType(this.attachment.mimetype) === 'image' &&
document.createElement('img'),
img: this.attachment.type == "image" && document.createElement('img'),
Owner

should be === 'image'

should be `=== 'image'`
Yonle marked this conversation as resolved
@ -46,3 +48,3 @@
.reduce(
(acc, attachment, i) => {
if (attachment.mimetype.includes('audio')) {
if (attachment.type == 'audio') {
Owner

=== instead of ==

`===` instead of `==`
Yonle marked this conversation as resolved
hj merged commit 9967f453e7 into develop 2026-03-04 18:41:30 +00:00
Sign in to join this conversation.
No reviewers
hj
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pleroma/pleroma-fe!3479
No description provided.