fix: persist homeUserId for federated users to ensure consistent avatar colors
Store the original home snowflake ID (homeUserId) during federation replication so that avatar gradient colors resolve identically across instances. Previously, replicated users got new snowflake IDs on each instance, causing different gradient colors. Now Avatar, UserProfilePopout, VoiceUser, StreamTile, and VoiceChannel all resolve through homeUserId when available. Includes backfill logic for existing federated users missing the field.
This commit is contained in:
@@ -48,7 +48,7 @@ export function Avatar({ src, name, size = 40, status, className = '', onClick,
|
||||
const initials = name.charAt(0).toUpperCase();
|
||||
// Match prototype: 24px→10px, 32-34px→12px, 40px→15px, 56px+→18px
|
||||
const fontPx = size <= 24 ? 10 : size <= 34 ? 12 : size <= 44 ? 15 : 18;
|
||||
const gradient = getAvatarGradient(userId ?? user?.id, name);
|
||||
const gradient = getAvatarGradient(userId ?? user?.homeUserId ?? user?.id, name);
|
||||
|
||||
const handleClick = (e: React.MouseEvent) => {
|
||||
if (onClick) {
|
||||
|
||||
Reference in New Issue
Block a user