Skip to content

Remove special BanFromCommunityResponse in favor of PersonResponse.#6113

Merged
Nutomic merged 2 commits intomainfrom
remove_ban_from_community_response
Oct 30, 2025
Merged

Remove special BanFromCommunityResponse in favor of PersonResponse.#6113
Nutomic merged 2 commits intomainfrom
remove_ban_from_community_response

Conversation

@dessalines
Copy link
Copy Markdown
Member

The site ban already returns PersonResponse now, this makes the BanFromCommunityResponse consistent to that.

The site ban already returns PersonResponse now, this makes the
BanFromCommunityResponse consistent to that.
@Nutomic
Copy link
Copy Markdown
Member

Nutomic commented Oct 30, 2025

This was mainly used to get the current ban value in the response which isnt included in the normal PersonResponse. Is that not useful for lemmy-ui?

@dessalines
Copy link
Copy Markdown
Member Author

It isn't really, I stumbled upon this while working in lemmy-ui.

When you call ban from community, you already have the banned boolean, so all the live page updates can assume that the ban went through.

I do think overall its good to return the changed object, but for this one I think its better to be consistent and just have actions done on a person return a PersonResponse.

@Nutomic
Copy link
Copy Markdown
Member

Nutomic commented Oct 30, 2025

Plus it simplifies the code.

@Nutomic Nutomic merged commit 5c10c76 into main Oct 30, 2025
2 checks passed
@Nutomic Nutomic deleted the remove_ban_from_community_response branch October 30, 2025 19:59
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.

2 participants