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:
@@ -20,7 +20,7 @@ export function StreamTile({ tile, large }: StreamTileProps) {
|
||||
const isLocal = participant.isLocal;
|
||||
const userId = participant.userId;
|
||||
const avatarUserId = participant.homeUserId ?? userId;
|
||||
const { displayName, avatar } = useVoiceParticipantMeta(participant);
|
||||
const { displayName, avatar, user } = useVoiceParticipantMeta(participant);
|
||||
|
||||
const isWatching = watchingStreams.has(userId);
|
||||
|
||||
@@ -110,7 +110,7 @@ export function StreamTile({ tile, large }: StreamTileProps) {
|
||||
) : (
|
||||
<div className="w-full h-full flex flex-col items-center justify-center gap-3 bg-surface-channel">
|
||||
<div className="relative">
|
||||
<Avatar src={avatar} name={displayName} size={large ? 80 : 48} userId={avatarUserId} />
|
||||
<Avatar src={avatar} name={displayName} size={large ? 80 : 48} userId={avatarUserId} user={user ?? undefined} />
|
||||
</div>
|
||||
<div className="text-center px-4">
|
||||
<p className="text-txt-primary text-sm font-semibold">
|
||||
|
||||
Reference in New Issue
Block a user