Repository navigation
fix: show the right avatars and file previews for multiple accounts on the same server - #6914
Merged
Merged
Conversation
mahibi
marked this pull request as ready for review
October 16, 2026 13:56
rapterjet2004
approved these changes
Oct 16, 2026
AndyScherzinger
approved these changes
Oct 16, 2026
The conversation avatar endpoint answers depending on the requesting account (one-to-one rooms return the other participant's avatar), but accounts on the same server request the same URL. Coil's memory and disk caches and OkHttp's HTTP cache were keyed by URL only, so one account could be shown another account's cached avatar. Scope the Coil cache keys of conversation avatar requests to the account sending them and keep OkHttp's URL-keyed cache out of image loading; Coil's own disk cache still revalidates per the server's cache headers. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The preview-by-path endpoint used by the remote file browser resolves the path in the requesting user's own files, so accounts on the same server request the same URL for different files. Treat it like the conversation avatar endpoint and scope its Coil cache keys per account; the interceptor is renamed accordingly as it no longer handles avatars only. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
…ches Replace the account-scoped cache keys with URLs whose response is the same for every account, so caches keyed by URL are correct again (as in the Nextcloud Files app): - One-to-one rooms show the peer's user avatar instead of the conversation avatar endpoint, which answers per requesting account. One-to-one rooms are never federated, so the peer is a local user. - Callers that only know the room token (direct share shortcuts, the ongoing call notification) bypass the caches for one-to-one rooms. - The remote file browser requests previews by file id instead of by path, which the server resolves in the requesting user's files. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
AndyScherzinger
force-pushed
the
differentiateAvatarsOneSameInstance
branch
from
October 16, 2026 17:15
a8a2383 to
b1cd347
Compare
Contributor
📱 QA build
The QA build installs alongside a released Nextcloud app, so you can keep Downloading the file requires a GitHub account, so open this link on the |
Contributor
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.
Problem 1: wrong avatar for one-to-one conversations
a. Set up accounts A and B on the same server, with a one-to-one conversation between them and different profile pictures.
b. Add both accounts to the app, with A active, and open the conversation list.
c. Switch to B.
d. Expected bug: the conversation with A shows B's own avatar. The user status shown on it is still correct.
Problem 2: wrong thumbnails in the remote file browser ("Share from ")
a. Set up accounts A and B on the same server. Each has its own file at the same path with different content, e.g. /Photos/test.jpg.
b. With A active, open a conversation → attachment button → "Share from " → Photos/. A's thumbnail is shown.
c. Switch to B and repeat.
d. Expected bug: B's row shows A's thumbnail next to B's own file size and date.
e. The same browser opens from Profile → change avatar → choose from Nextcloud.
Tests:
Side effects:
Related: nextcloud/talk-ios#1794 is the same avatar bug in the iOS app, still open there.
🖼️ Screenshots for Problem 1
testuser1' real avatar image: the living room

testuser2' real avatar image: the keyboard

🏚️ Before
🏡 After
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)