Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] filters don’t seem to always work #2911

Closed
mirabilos opened this issue May 7, 2024 · 7 comments
Closed

[bug] filters don’t seem to always work #2911

mirabilos opened this issue May 7, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@mirabilos
Copy link
Contributor

Describe the bug with a clear and concise description of what the bug is.

I’ve muted #esc2024 in “Home and lists”, with the “whole word” box ticked. But I got https://troet.cafe/@oomoepoo/112401533365274968 into my home timeline, which contains that hashtag.

It might be because someone I follow boosted it. I’m fairly sure these filters work for people whom I directly follow.

What's your GoToSocial Version?

0.15.0+git-15733cd 🦥

GoToSocial Arch

amd64 binary

What happened?

No response

What you expected to happen?

The filter to prevent the post from showing up in my home timeline.

How to reproduce it?

No response

Anything else we need to know?

No response

@mirabilos mirabilos added the bug Something isn't working label May 7, 2024
@tsmethurst
Copy link
Contributor

tsmethurst commented May 28, 2024

I think that's because on 0.15.0 we filter stuff based on the HTML render of the status, and the hashtag looks something like this when rendered in html: <a href="/tags/esc2024" class="mention hashtag status-link" rel="tag">#<span>esc2024</span></a>

For now, you might want to try filtering just esc2024 instead of #esc2024, until we have code in a release that filters based on the "plain" version of a status.

@mirabilos
Copy link
Contributor Author

Hmm, really?

Because I know that hashtag filters work, and I had monsterdon filtered which did not filter out #monsterdon (so I deleted the former and added a filter for the latter now).

My impression (which, of course, may be wrong) was that the filter did not apply to a boosted post (as opposed to one from someone I follow), but that may be wrong. Maybe we should test this, or something.

@VyrCossont
Copy link
Contributor

VyrCossont commented May 28, 2024

Filters definitely apply to posts boosted by people you follow. If a post is a boost, the post being boosted is converted to frontend representation (an operation that includes applying filters) by statusToFrontend, the same method that's applied to the post that is the boost. I've got a few examples of both filtered original posts and filtered boosts on my timeline right now, and both are correctly filtered in Phanpy (v2 API only) and Feditext (v1 API only).

I'm inclined to believe @tsmethurst's HTML theory (although note that we do actually convert the post's content HTML to plaintext). Please let us know if you find a counterexample.

Also, have any of these posts been edited? I know Mastodon doesn't update a post's out-of-band tags when an edit is received. Not sure about GtS, so it's possible that the hashtags displayed by your client aren't the ones in the post text.

Ignore all that, it doesn't apply to 0.15.0. 0.15.0 does no server-side filtering whatsoever, so this is your client's fault.

@mirabilos
Copy link
Contributor Author

Hmm, so I ought to have written down the post ID so we could debug it now.


Ah okay @ edit “ignore all that”.

I just verified that FediText indeed filters e.g. #dogs correctly from someone I follow. I haven’t tested with a boost; would it help at this point to test, or would anything now be obsolete by the time I’d get the next upgrade anyway? (I use Semaphore and FediText.)

@VyrCossont
Copy link
Contributor

Please open a Feditext bug if you find that Feditext doesn't filter boosts properly. Given that GtS 0.15.0 doesn't have server-side filtering, any issues would have to be client-side, and we can close this.

(0.16 will have server-side filtering, but Feditext doesn't use it yet feditext/feditext#57 and Semaphore is EOL.)

@tsmethurst
Copy link
Contributor

Ah okay ignore my comment above then, I was mistaken I think.

@daenney
Copy link
Member

daenney commented May 30, 2024

Given this is a client issue according to @VyrCossont, who would know after all 😄, I'll close this.

@daenney daenney closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants