Skip to content

Choosing a group picture replaced your own avatar (GRYT-1182) - #561

Merged
sivert-io merged 1 commit into
mainfrom
claude/GRYT-1182-group-picture-not-avatar
Sep 15, 2026
Merged

sivert-io merged 1 commit into
mainfrom
claude/GRYT-1182-group-picture-not-avatar

Conversation

@sivert-io

@sivert-io sivert-io commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Vikunja: GRYT-1182. Needs the server route from Gryt-chat/server#185. Mobile: Gryt-chat/mobile#214. Docs: Gryt-chat/docs#108.

Picking a group's picture in GroupDialog uploaded it through /api/uploads/avatar, which also made it your own avatar on that server. It uses the new /api/uploads/group-icon route now.

Older servers: if the new route answers 404, the client doesn't fall back to the avatar route, because that brings the bug back. It shows "This server needs an update before groups can have their own picture." and the group keeps its drawn egg. The rest of the dialog works as before. No released server has the route yet, so group pictures stop working everywhere until one does. Merge this after the server release.

  • utils/uploadGroupPicture.ts holds the upload. It reads fileId, which the avatar route's SVG path always sent instead of avatarFileId, so an SVG group picture no longer errors.
  • scripts/check-group-picture-upload.mjs (yarn test:group-picture-upload, added to CI) runs the helper against a fake fetch. It checks the route and header, that a refusal passes on the server's message, that a 404 gives the update message with no second request to the avatar route, and that GroupDialog uses the helper. Adding an avatar-route retry makes it fail.

I checked it in headless Chrome against a throwaway server running the server branch, with three guests. One of them created a group with a picture. Their avatar_file_id stayed null, the group's icon_file_id was the new file, and another member saw the picture load in their Messages list. On main the same steps set the uploader's avatar to the group picture. A server without the route answers Cannot POST /api/uploads/group-icon with a 404, which is what the fallback keys on.

yarn lint, yarn build and every test:* step in CI pass locally.

🤖 Generated with Claude Code

GroupDialog uploaded the picture through /api/uploads/avatar, which also
sets it as the uploader's avatar on that server. It uses the new
/api/uploads/group-icon route now.

A server without that route answers 404. The client doesn't retry on the
avatar route, since that would bring the bug back. It says the server
needs an update and the group keeps its drawn egg.

It reads fileId from the reply, which the SVG path always sent, so an
SVG group picture no longer errors either.

Co-Authored-By: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant