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

Add user block management api #11584

Merged
merged 5 commits into from
Oct 31, 2024
Merged

Add user block management api #11584

merged 5 commits into from
Oct 31, 2024

Conversation

nanaya
Copy link
Collaborator

@nanaya nanaya commented Oct 22, 2024

That the destroy/store endpoint is returning both friends and blocks feels a bit whack 🤨

Also it means three additional requests just to get full relation lists (friend, block, mapper (once added))...

Related to #10789.

Copy link
Collaborator

@notbakaneko notbakaneko left a comment

Choose a reason for hiding this comment

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

I think maybe a separate relations listing and add/remove block/friend returning only the relevant record? 🤔

@nanaya
Copy link
Collaborator Author

nanaya commented Oct 29, 2024

but then again for friends list you probably want to fetch the user data as well whereas for blocklist all that's needed is just the id so I'm not sure if combining them is useful

Copy link
Collaborator

@notbakaneko notbakaneko left a comment

Choose a reason for hiding this comment

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

Yeah I think it's kind of weird returning both friends and blocks, if anything at all...

I can see the case of knowing that the user is removed from the friends list if blocked, but that can be assumed to be implicit from blocking, so it isn't actually needed. 🤷
The most I can see is if you're blocking/adding friends from multiple clients open but it would see strange to me if blocking one user in the UI causes the whole list to change. (and I feel like the reason for returning the whole list was 'shove everything into React to render and not think about it' 🤔 )

@notbakaneko notbakaneko merged commit b347c2f into ppy:master Oct 31, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants