-
Notifications
You must be signed in to change notification settings - Fork 93
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
fix: blocked by peer status #5732
base: dev
Are you sure you want to change the base?
Conversation
After the CI passes: WebThis branch can be previewed at:
Desktop:If you have the launcher installed (download launcher) you can press open on the following link: SDK 6/7:More |
@@ -410,7 +410,9 @@ async function stripSnapshots(profile: Avatar): Promise<Avatar> { | |||
...profile, | |||
avatar: { ...profile.avatar, snapshots: newSnapshots as Snapshots }, | |||
// THIS IS IMPORTANT, the blocked and muted sizes are too big for the network and are unnecesary | |||
blocked: [], | |||
// blocked status propagation has been re-enabled so the current user knows when a peer has blocked it |
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.
can't messages be ignored locally instead? I'm worried about the big warning above
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.
Can you please elaborate?
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 meant the warning in the comment "the blocked and muted sizes are too big for the network", can we simply ignore the messages if we get one from a blocked user?
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.
Is not only the chat messages. You shouldnt be able to interact with friend requests or preview the passport of peers that blocked you. We have special states in the UI for this.
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.
ok, understood, but I don't think we can simply send this through comms, some users have thousands of addresses in the block list, and this message is broadcasted to everyone around the user.
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 will try to make a workaround by fetching the user profile from the catalyst when this information is required
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.
Trying to fetch the blocked list from the catalyst when needed adds too much complexity thus a mess to handle with the current architecture. A new proposal is coming on which profile information will always be fetched from the catalyst instead of being broadcasted through comms. This way would fix the problem
What does this PR change?
Re-enables the propagation of the
blocked
list through comms and improves UI (user context menu & passport) flows when the peer has blocked you.NOTE: it may have an impact in the comms infra throughput/costs.
How to test the changes?
Our Code Review Standards
https://github.com/decentraland/unity-renderer/blob/master/docs/code-review-standards.md
Copilot summary
🤖 Generated by Copilot at 758c31c
This pull request fixes the blocked status propagation in the comms layer and updates the passport and user context menu UIs to reflect the blocked status of the user and the peer. It renames the field
hasBlocked
toisBlockedByPeer
in thePlayerPassportModel
and thePassportPlayerInfoComponentController
classes, and uses the blocked status from the comms layer and the user profile model in thePassportPlayerInfoComponentView
and theUserContextMenu
classes. It also comments out the lines that clear the blocked and muted lists of the user profile in thesagas.ts
file.