mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
* 🐛 fix: use custom avatar for group chat in sidebar When a group chat has a custom avatar set, the sidebar was always showing the member composition avatar instead. This fix: - Queries chatGroups.avatar and chatGroups.backgroundColor in HomeRepository - Prioritizes custom avatar (string) over member avatars (array) in data layer - Replaces GroupAvatar with AgentGroupAvatar in AgentGroupItem for proper avatar type detection (custom vs member composition) Closes LOBE-4883 * ✅ test: add DB tests for group chat custom avatar in sidebar Add 6 test cases covering the custom avatar fix for chat groups: getSidebarAgentList: - should return custom avatar when chat group has one set - should return member avatars when chat group has no custom avatar - should prioritize custom avatar over member avatars searchAgents: - should return custom avatar for chat groups with custom avatar in search - should return member avatars for chat groups without custom avatar in search - should prioritize custom avatar over member avatars in search