feat: real-time user profile updates and propagate avatarColor to all Avatar callsites
Broadcast user_updated events over WebSocket when profile fields change, updating members, DM participants, friends, and cached messages in real time. Widen useVoiceParticipantMeta to return the full user object and add a standalone avatarColor prop to Avatar so all ~16 callsites now resolve the user's chosen gradient color instead of falling back to hash-based colors.
This commit is contained in:
@@ -29,7 +29,7 @@ export function VoiceUser({ tile, large }: VoiceUserProps) {
|
||||
|
||||
const isLocal = participant.isLocal;
|
||||
const avatarUserId = participant.homeUserId ?? participant.userId;
|
||||
const { displayName, avatar } = useVoiceParticipantMeta(participant);
|
||||
const { displayName, avatar, user } = useVoiceParticipantMeta(participant);
|
||||
|
||||
// --- VIDEO & UI ---
|
||||
|
||||
@@ -98,6 +98,7 @@ export function VoiceUser({ tile, large }: VoiceUserProps) {
|
||||
name={displayName}
|
||||
size={large ? 100 : 64}
|
||||
userId={avatarUserId}
|
||||
user={user ?? undefined}
|
||||
/>
|
||||
{isSpeaking && (
|
||||
<div className="absolute -inset-1.5 rounded-full ring-[3px] ring-status-online animate-pulse" />
|
||||
|
||||
Reference in New Issue
Block a user