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

Make it so the signed in user can see if they're banned from a community #4458

Merged
merged 2 commits into from
Feb 18, 2024

Conversation

SleeplessOne1917
Copy link
Member

Related to this UI issue.

Why is this change useful? To quote my comment from the linked issue:

This will most likely require an API change to handle in a way that isn't sloppy. There are 2 ways this could be done without an API change:

  1. Look for one of the user's posts or comments in the community to check its creator_banned_from_community property. This could be troublesome if the banned user's posts were purged, and also introduces extra API calls.
  2. Search the modlog for community bans. This requires making sure that they didn't receive an unban after the ban or that the ban has expired. This will require extra logic and API calls.

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

Makes sense, thx. I'm not sure if this should also be added to PostView and CommentView, but that might be overkill. This is good for now.

crates/db_views_actor/src/structs.rs Outdated Show resolved Hide resolved
@SleeplessOne1917
Copy link
Member Author

I'm not sure if this should also be added to PostView and CommentView, but that might be overkill.

It's already on those structs:

pub creator_banned_from_community: bool,

@SleeplessOne1917 SleeplessOne1917 enabled auto-merge (squash) February 17, 2024 20:01
@SleeplessOne1917 SleeplessOne1917 merged commit 3934546 into main Feb 18, 2024
2 checks passed
@SleeplessOne1917 SleeplessOne1917 deleted the banned-from-community branch February 18, 2024 18:46
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.

None yet

2 participants