Skip to content

Conversation

@Steffo99
Copy link
Contributor

@Steffo99 Steffo99 commented Jan 2, 2025

Another draft PR posted as per #777.

This is in a really bad state, as I quickly hacked it together just to see what was feasible and what was not, but it might be of interest for future, better implementations.

Thread mutes

akkoma and pleroma collapse muted threads in the same way Phanpy filters posts, so the behavior is reproduced in Phanpy by checking for the pleroma.threadMuted property, and by spoofing a filterInfo object containing the title Thread muted.

A muted thread in Akkoma.

A muted thread in Phanpy with this patch.

Add regex filtering

akkoma and pleroma do not implement server-side keyword filtering like Mastodon does, and instead rely on frontends to implement it themselves.

This patch implements very basic client-side filtering in Phanpy, by adding a textarea to Settings where the user can input their own regular expressions to filter, and then by matching those to the contents of each post, then spoofing a filterInfo object containing as title the first regex that matched.

Warning

Since this creates new RegExp objects for each checked post, it probably is very inefficient; ideally, regular expressions should be compiled just once globally, and then just applied to each individual post.

@cheeaun cheeaun added enhancement New feature or request pleroma akkoma labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

akkoma enhancement New feature or request pleroma

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants