Skip to content

Federation: Support remote user avatar decorations with source URLs#29

Merged
helleled merged 1 commit intodevelopfrom
feat-store-remote-avatar-decorations
Oct 28, 2025
Merged

Federation: Support remote user avatar decorations with source URLs#29
helleled merged 1 commit intodevelopfrom
feat-store-remote-avatar-decorations

Conversation

@cto-new
Copy link

@cto-new cto-new bot commented Oct 28, 2025

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

  • Broadened the MiUser.avatarDecorations type to support an optional url property for remote decorations
  • In ApPersonService, added sanitizer logic on create and update to parse and validate remote _misskey_avatarDecorations (host/HTTPS restriction, limits, bounds, list size)
  • Avatar decoration entries from remote actors only overwrite the field if new data is supplied on update
  • API responses (UserEntityService.pack) now return remote decoration metadata, including URL, even when no local decoration configuration exists
  • Added and enhanced unit tests in ActivityPub and UserEntityService to validate correct parsing, sanitization, persistence, and surface of remote decorations in user objects
  • No breaking changes; existing local logic and federation compatibility preserved

Warning: Task VM test is not passing, cto.new will perform much better if you fix the setup

…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.
@github-actions
Copy link

このPRによるapi.jsonの差分
差分はありません。
Get diff files from Workflow Page

@helleled helleled merged commit 24ba524 into develop Oct 28, 2025
24 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant