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

Basic filtering for "nsfw" keyword #2975

Merged
merged 5 commits into from
Mar 9, 2021
Merged

Basic filtering for "nsfw" keyword #2975

merged 5 commits into from
Mar 9, 2021

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Mar 8, 2021

New settings, in Settings/Preferences screen, off by default:

(Edit: wording has been updated, see new screenshot below)
image

Filtering room directory

image

Also migrate RoomDirectoryService to coroutines (#2449)

@SimonBrandner
Copy link

SimonBrandner commented Mar 8, 2021

May I have two questions here?

  • I think "Filter NSFW rooms" might be easier to find.
  • How exactly does the filtering work? The Blender room, for example, has "No NSFW Media" in its name description. Would it be hidden then?

@bmarty
Copy link
Member Author

bmarty commented Mar 8, 2021

* I _think_ _Filter NSFW rooms_ might be easier to find.

"NSFW" is not understandable enough for non power users.

* How exactly does the filtering work? The Blender room, for example, has _No NSFW Media_ in its name. Would it be hidden then?

Yes, I have seen the problem with the Blender room, it will be actually filtered out. Filtering like that is far from ideal. This is a first quick implementation, we will do better in the future (filtering server side, new state event describing the room content, etc.)

@SimonBrandner
Copy link

Thanks for the quick response!

"NSFW" is not understandable enough for non power users.

Maybe "Filter explicit content" or something like that. I would just expect the explicit word to be in the "header".

But I am probably just nitpicking at this point... 😂 Sorry for annoying

@bmarty
Copy link
Member Author

bmarty commented Mar 8, 2021

I have created https://github.com/matrix-org/matrix-doc/issues/3054 to try to do better on this subject

@bmarty
Copy link
Member Author

bmarty commented Mar 9, 2021

Update wording

image

@bmarty
Copy link
Member Author

bmarty commented Mar 9, 2021

FTR I have asked the admin of the room about Blender to update the topic of the room to avoid being filtered by mistake.

@onurays onurays self-requested a review March 9, 2021 14:30
val newPublicRooms = data.chunk.orEmpty()
.filter {
showAllRooms
|| "${it.name.orEmpty()} ${it.topic.orEmpty()} ${it.canonicalAlias.orEmpty()}".toLowerCase(Locale.ROOT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't suggest a better way for now, will think later.

Copy link
Contributor

@onurays onurays left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, cool!

@bmarty bmarty merged commit eaf27a0 into develop Mar 9, 2021
@bmarty bmarty deleted the feature/bma/nsfw_filter branch March 9, 2021 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants