Conversation
…URLs This change enables federation of avatar decorations from remote users by broadening the internal `MiUser.avatarDecorations` typing to support a source URL alongside angle/flip/offset metadata. Remote decorations are sanitized (host, HTTPS, value limits) upon import and update in `ApPersonService`; only supplied data now overwrites existing entries. `UserEntityService.pack` was updated to expose remote decorations with URLs if no local definition exists. Comprehensive unit tests added and updated to ensure correct processing and serialization. No breaking changes; API clients and UI benefit from richer avatar display for remote users.
|
このPRによるapi.jsonの差分 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR enables users to see avatar decorations federated from remote instances, with full metadata and usable image URLs even if the decoration does not exist locally.
Details
MiUser.avatarDecorationstype to support an optionalurlproperty for remote decorationsApPersonService, added sanitizer logic on create and update to parse and validate remote_misskey_avatarDecorations(host/HTTPS restriction, limits, bounds, list size)UserEntityService.pack) now return remote decoration metadata, including URL, even when no local decoration configuration existsWarning: Task VM test is not passing, cto.new will perform much better if you fix the setup