Skip to content

fix(avatars): draw guest and bot avatars on the client - #6613

Merged
mahibi merged 1 commit into
masterfrom
fix/noid/client-side-avatars
Sep 2, 2026
Merged

fix(avatars): draw guest and bot avatars on the client#6613
mahibi merged 1 commit into
masterfrom
fix/noid/client-side-avatars

Conversation

@AndyScherzinger

Copy link
Copy Markdown
Member

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

馃弫 Checklist

  • 鉀戯笍 Tests (unit and/or integration) are included or not needed
  • 馃敄 Capability is checked or not needed
  • 馃敊 Backport requests are created or not needed: /backport to stable-xx.x
  • 馃搮 Milestone is set
  • 馃尭 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

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 <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger added this to the 25.1.0 milestone Sep 1, 2026
@AndyScherzinger AndyScherzinger added bug Something isn't working 3. to review Waiting for reviews labels Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/33540018116/artifacts/9815269872
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@mahibi
mahibi merged commit ad15adf into master Sep 2, 2026
16 of 20 checks passed
@mahibi
mahibi deleted the fix/noid/client-side-avatars branch September 2, 2026 12:01
@mahibi

mahibi commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

/backport to stable-25.0.x

@backportbot

backportbot Bot commented Sep 2, 2026

Copy link
Copy Markdown

The backport to stable-25.0.x failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable-25.0.x
git pull origin stable-25.0.x

# Create the new backport branch
git checkout -b backport/6613/stable-25.0.x

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick e841d044

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/6613/stable-25.0.x

Error: Failed to clone repository: Failed to create working tree: error: RPC failed; HTTP 401 curl 22 The requested URL returned error: 401
fatal: expected flush after ref listing


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@mahibi

mahibi commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

/backport to stable-25.0.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants