Skip to content

[stable-25.1.x] fix(chat): load avatars of federated users - #7057

Merged
mahibi merged 10 commits into
stable-25.1.xfrom
backport/7053/stable-25.1.x
Nov 20, 2026
Merged

mahibi merged 10 commits into
stable-25.1.xfrom
backport/7053/stable-25.1.x

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Backport of #7053

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

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

@backportbot backportbot Bot added enhancement New feature or request 3. to review Waiting for reviews feature: chat 🗨️ AI assisted labels Nov 17, 2026
@backportbot backportbot Bot added this to the 25.1.1 milestone Nov 17, 2026
AndyScherzinger and others added 10 commits November 17, 2026 18:42
Messages of federated users requested their avatar from the own
server's avatar endpoint, which knows no user with that cloud ID, and
their mention chips requested it from the Talk proxy endpoint without
credentials, so only the placeholder was shown.

Their avatar is now requested from the Talk proxy endpoint of the
conversation, as in the participant list and on web. As that endpoint
requires a logged-in participant, avatar and mention chip requests for
federated users now carry the account's credentials, also in the
pinned message. Those for local users stay without credentials, as the
server answers them depending on who asks, while the image caches are
keyed by URL only.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
As on web, the author of a message from a federated user is shown
with their server in brackets, e.g. "Alice (cloud.example.com)", in
the message, in quotes and in the reply preview, so they can be told
apart from local users of the same name.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Federated users are now shown with their server in brackets after
their name in chat notifications, their conversation shortcuts and
pinned messages, also when they pinned a message, as in the chat.

For a federated sender the notification's user object carries the
part of the cloud ID before the server as id and the server
separately. The sender's avatar was therefore requested for a local
user of that id, so it was missing or showed someone else's avatar.
It is now requested from the Talk proxy endpoint of the conversation,
and the notification person is keyed by the full cloud ID.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Media and other items loaded from the shared items API name their
author by the actor parameter of the message only. Federated authors
are now shown with their server in brackets, as in the chat. This
covers the title of the media viewer for media it loads from there,
e.g. older media of a chat or media opened from the shared items, and
the author in the shared items list.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
The mention chip that the message input shows for a picked federated
user requested the avatar from the Talk proxy endpoint without
credentials. That endpoint only answers logged-in participants, so the
chip lost its icon, and every such request counted as a failed attempt
for the server's brute force protection.

The request for the avatar of a federated user now carries the
account's credentials, and a failed request keeps the default icon of
the chip.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
The call view requested the avatar of a federated participant from the
Talk proxy endpoint without credentials. The endpoint only answers
logged-in participants, so the tile showed no avatar, and every request
counted as a failed attempt for the server's brute force protection.

The participant grid now provides the account's credentials to its
images, and the tile of a federated participant sends them with the
avatar request.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
The avatar next to a message was clickable for every author, but only
the profile of users can be shown. For federated users, guests and bots
screen readers announced a button that did nothing when activated.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
The avatar next to a message and the avatars in mention chips were
always requested in their light variant, while the call, the message
input and notifications follow the dark theme. Authors without a
picture got a light generated avatar in the dark theme.

The avatar URL of a message author was built in the view model, which
cannot tell the theme of the app. It is now built where the avatar is
drawn, so it follows the theme and changes with it. Mention chips get
the theme passed in as well.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>

# Conflicts:
#	app/src/main/java/com/nextcloud/talk/chat/viewmodels/ChatViewModel.kt
#	app/src/test/java/com/nextcloud/talk/chat/audio/ChatAudioTrackTest.kt
#	app/src/test/java/com/nextcloud/talk/chat/viewmodels/ChatViewModelTest.kt
Mapping a message to its UI model encoded the account's credentials
for the avatar and mention chip requests again for every message, and
again for its quoted parent, each time the message list was rebuilt.

The chat and the scheduled messages now encode them once and hand the
same value to every message they map.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
…pants

The participant list gave no hint that a participant has their account
on another server. Like the web and iOS clients, the avatar of a
federated participant now carries a globe icon where the user status
is shown otherwise, as their user status is not available anyway.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger
AndyScherzinger force-pushed the backport/7053/stable-25.1.x branch from a148571 to 9c7237b Compare November 17, 2026 17:51
@AndyScherzinger
AndyScherzinger marked this pull request as ready for review November 17, 2026 18:21
@github-actions

Copy link
Copy Markdown
Contributor

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit 9c7237b
Version 7057
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

@github-actions

Copy link
Copy Markdown
Contributor

Codacy

Lint

TypemasterPR
Warnings17138
Errors015

SpotBugs

CategoryBaseNew
Bad practice77
Correctness88
Dodgy code4040
Internationalization33
Malicious code vulnerability33
Performance77
Security1111
Total7979

@mahibi
mahibi merged commit d2ae2d8 into stable-25.1.x Nov 20, 2026
16 of 17 checks passed
@mahibi
mahibi deleted the backport/7053/stable-25.1.x branch November 20, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants