fix: broadcast camera & screen share status via WebSocket for sidebar visibility
Camera and LIVE badges in the channel sidebar were only visible to users
who had joined the same LiveKit room. Widen the voice_status WS event
from {isMuted, isDeafened} to {isMuted, isDeafened, isCameraOn, isScreenSharing}
so all server members see camera/screenshare indicators without joining voice.
This commit is contained in:
@@ -186,12 +186,12 @@ export type ClientEvent =
|
||||
| { type: 'dm_call_accept'; dmChannelId: string }
|
||||
| { type: 'dm_call_reject'; dmChannelId: string }
|
||||
| { type: 'dm_call_end'; dmChannelId: string }
|
||||
| { type: 'voice_status'; isMuted: boolean; isDeafened: boolean }
|
||||
| { type: 'voice_status'; isMuted: boolean; isDeafened: boolean; isCameraOn: boolean; isScreenSharing: boolean }
|
||||
| { type: 'ping' };
|
||||
|
||||
// Server → Client Events
|
||||
export type ServerEvent =
|
||||
| { type: 'ready'; user: User; servers: ServerWithChannelsAndMembers[]; dmChannels: DmChannel[]; folders?: ServerFolder[]; voiceStates?: Record<string, string[]>; voiceUserStates?: Record<string, { isMuted: boolean; isDeafened: boolean }>; readStates?: ReadState[] }
|
||||
| { type: 'ready'; user: User; servers: ServerWithChannelsAndMembers[]; dmChannels: DmChannel[]; folders?: ServerFolder[]; voiceStates?: Record<string, string[]>; voiceUserStates?: Record<string, { isMuted: boolean; isDeafened: boolean; isCameraOn: boolean; isScreenSharing: boolean }>; readStates?: ReadState[] }
|
||||
| { type: 'message_created'; message: MessageWithUser }
|
||||
| { type: 'message_updated'; message: MessageWithUser }
|
||||
| { type: 'message_deleted'; messageId: string; channelId: string }
|
||||
@@ -213,7 +213,7 @@ export type ServerEvent =
|
||||
| { type: 'dm_call_accepted'; dmChannelId: string }
|
||||
| { type: 'dm_call_rejected'; dmChannelId: string }
|
||||
| { type: 'dm_call_ended'; dmChannelId: string }
|
||||
| { type: 'voice_status_update'; userId: string; channelId: string; isMuted: boolean; isDeafened: boolean }
|
||||
| { type: 'voice_status_update'; userId: string; channelId: string; isMuted: boolean; isDeafened: boolean; isCameraOn: boolean; isScreenSharing: boolean }
|
||||
| { type: 'dm_channel_created'; dmChannel: DmChannel }
|
||||
| { type: 'dm_channel_closed'; dmChannelId: string }
|
||||
| { type: 'friend_removed'; userId: string }
|
||||
|
||||
Reference in New Issue
Block a user