mastodon-android icon indicating copy to clipboard operation
mastodon-android copied to clipboard

[BUG] App doesnt respect filters

Open davidbtc2009 opened this issue 2 years ago • 7 comments

I have my settings set to only show english as that is the only language i speak. However i know that some other languages use english characters or near enough so that isnt my main problem. The app also does not appear to be respecting user defined filters either

davidbtc2009 avatar Apr 29 '22 13:04 davidbtc2009

It should respect the word filters. Language filters are something I've never seen before?

grishka avatar Apr 29 '22 13:04 grishka

Account settings > preferences > other

Sent from ProtonMail mobile

-------- Original Message -------- On Apr 29, 2022, 9:58 AM, Gregory K wrote:

It should respect the word filters. Language filters are something I've never seen before?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

davidbtc2009 avatar Apr 29 '22 15:04 davidbtc2009

I can confirm that word filters don't appear to work. I have a few hashtags filtered out with this configuration that get hidden in the web UI, but display in the app: Screenshot_20220430-062456

ajhall avatar Apr 30 '22 10:04 ajhall

Exactly the same to me. I've asked and see other people are able to filter out hashtags and keywords. Added some filters that do work on the web interface but ignored by the app.

javierguerragiraldez avatar Jun 12 '22 14:06 javierguerragiraldez

I don't see any reference to filters in the Settings screen of the app:

And going to the account settings, as mentioned above, doesn't show them either (it opens a webview with only account-rekated actions like moving to a different server, changing the password, etc.)

To get to the filters I have to, from the account settings page in the webview, click the hamburger menu and then select Filters. This is completely undiscoverable and should be readily accessible from the app settings screen.

waldyrious avatar Nov 08 '22 16:11 waldyrious

Yes, the filters aren't shown anywhere in the UI (for now), but they are loaded and applied. If some of them don't apply the way they do in the web app, this is a bug I would need to fix.

grishka avatar Nov 08 '22 16:11 grishka

@grishka would it be worth opening a separate issue to track adding a "Filters" entry in the app's Settings screen (even if just as a link to a webview, as is the case with the "Account settings" one?)

waldyrious avatar Nov 08 '22 16:11 waldyrious

The app doesn't respects filters.

Example - I have a filter for #Caturday, which the website respects, but the app ignores.

Website (filtered post hidden) Screenshot_20221120-105920

App (filtered post not hidden) Screenshot_20221120-105721

Reschat avatar Nov 20 '22 10:11 Reschat

https://github.com/tuskyapp/Tusky/issues/2660 Tusky fixed a similar issue recently. I wonder if it might be a similar root cause.

ajhall avatar Nov 20 '22 14:11 ajhall

Hm. I think I actually tested my filter implementation on cats, too

grishka avatar Nov 21 '22 09:11 grishka

Parse html tags out of status content before applying filters.

Yeah okay that makes sense. I'm testing filters against raw html, which is not the best idea.

grishka avatar Nov 21 '22 09:11 grishka

Mastodon 4.0 adds filtered property on posts so you don't need manually regex stuff client-side anymore, you just need to confirm that expiration time has not been reached yet.

Gargron avatar Nov 21 '22 10:11 Gargron

Posts not being filtered in Android app. Filters work as expected on desktop web interface.

MarkSte avatar Dec 09 '22 04:12 MarkSte

Are you using version 1.1.4?

grishka avatar Dec 09 '22 05:12 grishka

I am using Mastodon for Android 1.1.4 (45)

MarkSte avatar Dec 09 '22 05:12 MarkSte

Are you using version 1.1.4?

I'm using 1.1.4 and filters are still not working.

image

image

image

Reschat avatar Dec 09 '22 05:12 Reschat

Huh, profiles? It's the first time I'm seeing this option. There was never any code in the app to apply filters to posts in profiles.

grishka avatar Dec 09 '22 05:12 grishka

The option is there on the website. Should it be removed from the website?

The issue also occurs in home and timelines. This is just one example that was quick for me to find just now.

Reschat avatar Dec 09 '22 05:12 Reschat

No, it's just that this option is new and I was never told that it was introduced, and so I never added support for it on my side.

The issue also occurs in home and timelines.

In 1.1.4?

grishka avatar Dec 09 '22 05:12 grishka

It occurs for me in Home in 1.1.4.

On Thu, Dec 8, 2022, 11:19 PM Gregory K @.***> wrote:

No, it's just that this option is new and I was never told that it was introduced, and so I never added support for it on my side.

The issue also occurs in home and timelines.

In 1.1.4?

— Reply to this email directly, view it on GitHub https://github.com/mastodon/mastodon-android/issues/94#issuecomment-1343864819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANHUMGJIKGZE3J7ZSCICBLWMK6ONANCNFSM5UWDCDXQ . You are receiving this because you commented.Message ID: @.***>

MarkSte avatar Dec 09 '22 05:12 MarkSte

Also for me. Example:

Screenshot_20221209-065922

Screenshot_20221209-065855

Reschat avatar Dec 09 '22 06:12 Reschat

@MarkSte: It occurs for me in Home in 1.1.4.

Maybe that's related to the filters only getting updated once every hour, as per AccountSessionManager.java#L254? When removing this check (and thus updating on every app restart), filters do appear to work for me (on home) (but I don't know whether the implementation is the same; as in whether the same posts are being filtered as on Web).

…so probably, if the filtered field is available, client-side filtering shouldn't be done at all:

@Gargron: Mastodon 4.0 adds filtered property on posts so you don't need manually regex stuff client-side anymore, you just need to confirm that expiration time has not been reached yet.

Also, the whole "Hide with a warning - Show anyway" feature is missing. image

sk22 avatar Dec 09 '22 13:12 sk22

That's odd. Today, without any changes in my filters (or other settings) in 12 hours, filters are now working on both the Android app and the desktop browser version. BUT...I have the filter set to "Hide with a warning" and on Android app, filtered posts are being completely hidden. On the desktop, filtered posts are being hidden behind a warning. I'm still running Android 1.1.4 (45) and v4.0.2 on the desktop.

MarkSte avatar Dec 09 '22 16:12 MarkSte

Yes, the app reloads the filters periodically.

BUT...I have the filter set to "Hide with a warning" and on Android app, filtered posts are being completely hidden.

This is a new feature in Mastodon 4.0. The code to implement this has not yet been written and the warning has not yet been designed.

grishka avatar Dec 09 '22 16:12 grishka

If I understand grishka correctly, the Android app's implementation of filters fails for the setting "Hide with a warning" but works for the setting "Hide completely." I just experimented and found that offending posts are hidden completely on Android app no matter which setting is used. On the desktop filters work as I expect.

MarkSte avatar Dec 09 '22 16:12 MarkSte

Mastodon 4.0 adds filtered property on posts so you don't need manually regex stuff client-side anymore, you just need to confirm that expiration time has not been reached yet.

@Gargron Wouldn't this not work for old posts that have already been downloaded by clients?

saket avatar Nov 19 '23 06:11 saket