fix(messages): peer avatar visibility in chat bubbles
- ConversationsContext: subscribe to profiles UPDATE realtime so conversation members[].profile picks up peer avatar / displayName changes without a manual refresh - ConversationPage: skip call_event messages when computing run boundaries. Previously a peer bubble followed by a call event from the same sender was treated as mid-run -> avatar slot collapsed to a placeholder - DM peer-profile fallback already added in previous commit covers transient member-lookup misses
This commit is contained in:
@@ -151,6 +151,15 @@ export function ConversationsProvider({ children }: { children: ReactNode }) {
|
||||
.on('postgres_changes', { event: '*', schema: 'public', table: 'conversations' }, () => {
|
||||
void refresh();
|
||||
})
|
||||
.on(
|
||||
'postgres_changes',
|
||||
{ event: 'UPDATE', schema: 'public', table: 'profiles' },
|
||||
() => {
|
||||
// Peer updated their profile (e.g. uploaded avatar / changed name).
|
||||
// Re-pull conversations so members[].profile picks up the new data.
|
||||
void refresh();
|
||||
},
|
||||
)
|
||||
.on(
|
||||
'postgres_changes',
|
||||
{ event: 'INSERT', schema: 'public', table: 'messages' },
|
||||
|
||||
Reference in New Issue
Block a user