Skip to content

fix: handling of third-party wearable on ExtendedUrnParser class #6201

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

Closed
wants to merge 1 commit into from

Conversation

aleortega
Copy link
Contributor

What does this PR change?

This PR addresses how third-party wearables are processed by the ExtendedUrnParser class. This class is responsible for shortening URNs when they are extended (i.e., urn.Split(':').Length > 6). When an extended URN is received, it cuts off the last part and returns the shortened version. This is necessary because the /entities/active endpoint from Catalysts' content servers expects the shortened URN to return the wearable/emote metadata.

The issue was that wearables from third-party providers contain 7 parts, causing the code to mistakenly treat them as extended URNs, which is not the case. Third-party wearables have an additional part but that part do not represent a token id (which is the part that should be removed), so we need to call the Catalysts endpoint using the entire URN received instead of shortening it.

The changes in this PR prevent the removal of the last part of the URN when this method receives a wearable's URN from a third-party provider (i.e., urn.Contains("collections-thirdparty")).

Our Code Review Standards

https://github.com/decentraland/unity-renderer/blob/master/docs/code-review-standards.md

Copilot summary

copilot:summary

@aleortega aleortega closed this May 30, 2024
@aleortega aleortega deleted the fix/third-party-wearable-handling branch May 30, 2024 21:28
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.

1 participant