-
Notifications
You must be signed in to change notification settings - Fork 384
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
Conversation
There was a problem hiding this 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? 🤔
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 |
There was a problem hiding this 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' 🤔 )
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.