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:
@@ -322,7 +322,7 @@ export function PictureInPicture() {
|
||||
[selectedStream, fallbackParticipant],
|
||||
);
|
||||
|
||||
const { displayName: resolvedName, avatar: resolvedAvatar } =
|
||||
const { displayName: resolvedName, avatar: resolvedAvatar, user: resolvedUser } =
|
||||
useVoiceParticipantMeta(displayParticipant ?? EMPTY_PARTICIPANT);
|
||||
|
||||
if (!shouldShow) return null;
|
||||
@@ -370,6 +370,7 @@ export function PictureInPicture() {
|
||||
name={resolvedName}
|
||||
size={64}
|
||||
userId={displayParticipant.homeUserId ?? displayParticipant.userId}
|
||||
user={resolvedUser ?? undefined}
|
||||
/>
|
||||
{speakingParticipantIds.has(displayParticipant.identity) && (
|
||||
<div className="absolute -inset-1 rounded-full ring-2 ring-status-online animate-pulse" />
|
||||
|
||||
Reference in New Issue
Block a user