[feat] apply wordfilters to attachment alt-texts #384
No reviewers
Labels
No labels
a11y
Bug
Bug fix
Critical Priority
Documentation
Feature
Feature request
Held for next release cycle
High Priority
Low Priority
Medium Priority
Minor change
Translation/Locale
WIP
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma-fe#384
Loading…
Reference in a new issue
No description provided.
Delete branch "sn0w/akkoma-fe:feature/alt-text-filters"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
many users - myself included - use wordfilters extensively to opt-out of certain sensitive topics / niche microcelebrity circles / etc. for mental health reasons.
this generally works well, but in some cases falls flat with posts leaking through.
a prominent example are memes related to the muted topic that have an empty or very short body the filter can't match.
since fedi has cultivated the habit of alt-texting everything, it would make sense to use that for discovering unwanted content.
i've been test-running this patch on cofe for a few days now and so far it majorly improved my experience.
would be cool to have it in the official FE as well.
@ -8,0 +11,4 @@
for (let attachment of status.attachments) {
res |= attachment.description?.toLowerCase().includes(muteWord)
}
nit: this could directly return as soon as something matches the word
it could also be rewritten as a
.some
call to remove the loop entirelyres |= status.attachments.some((attachment) => ...)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.