-
-
Notifications
You must be signed in to change notification settings - Fork 859
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
[WIP] Add backend support for muting communities #3238
Conversation
This is already implemented as |
@Nutomic hiding seems to be something that admins do. Like they can hide a community so that it doesn't appear on the front page for every user. This PR is per user configuration like blocking. I can mute a community so that it does not appear in the all feed for me but continues to appear for other users (unless they choose to mute it too). |
175845d
to
c236a3b
Compare
I still don't fully understand the difference between community blocking and muting. If I don't want to see a community, why not block it? |
Blocking precludes you from interacting with the community in any way. If you mute a community, you can either visit it manually or follow a link to a post in that community and leave a comment there or vote if you want. It just won't appear in your feeds. |
To be more clear then, this should be |
c236a3b
to
2cbe7d9
Compare
5996138
to
6d692cd
Compare
6d692cd
to
e9512e8
Compare
I think theres an open issue about allowing you to browse a blocked community if you explicitly navigate to it, or view a post inside it. I think that would be a reasonable solution and it wouldnt require yet another setting. |
That does sound like a better solution to me. I'll look into that and close the PR in a while. |
Fixes #3160
Adding backend support for muting communities in this PR.
The database schema and API are identical to that for blocking of communities.
Communities are muted/unmuted via
/api/v3/community/mute
endpoint and the request structure is identical to/community/blocking
:Where muting differs from blocking is that it only affects listing of posts when
ListingType
inPostQuery
isAll
orLocal
and all ofcommunity_id
,creator_id
andsearch_term
are not provided. PlusPostQuery
takes an optional valueshow_muted
. When this value isOption<true>
, posts from muted communities are never hidden. I have tried to be conservative with making changes to default API behaviour which is why as things currently are, only the default output for /c/all and /c/local would be affected.TODO
apub
crate. I implemented theSendActivity
trait so that compilation succeeds and I can test the changes locally. ActivityPub spec does not mention muting so not sure what to do here. Help appreciated.post_view.rs