[stable-25.0.x] fix(avatars): draw guest and bot avatars on the client - #6618
Draft
backportbot[bot] wants to merge 1 commit into
Draft
[stable-25.0.x] fix(avatars): draw guest and bot avatars on the client#6618backportbot[bot] wants to merge 1 commit into
backportbot[bot] wants to merge 1 commit into
Conversation
fix(avatars): draw guest and bot avatars on the client
Guests, email participants and bots have no avatar on the server, yet the
app requested one from /index.php/avatar/guest/{name} in six places and drew
its own initial or ">" in others, each place with its own idea of when a
display name counts as a real name.
Resolve all of them in CharacterAvatarUtils, mirroring the web client's
AvatarWrapper so both clients show the same avatar for the same actor: a
named guest gets the first character of their name, a bot the shell prompt,
an unnamed guest the generic person icon, and the changelog and sample bots
keep the app icon. Two renderers consume that decision,
CharacterAvatarDrawable for views and notifications and CharacterAvatar for
Compose, both scaling the character to the bounds they are given instead of
to a fixed bitmap, and both taking the theme-aware colours web uses.
Removes ApiUtils.getUrlForGuestAvatar together with the requests for it,
TextDrawable, and the already unused ChatMessageUtils.
Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Andy Scherzinger <[email protected]>
[skip ci]
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.
Backport of #6613
Warning, This backport's changes differ from the original and might be incomplete鈿狅笍
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.