feat(voice): журнал обработанных вебхуков LiveKit
This commit is contained in:
@@ -76,9 +76,12 @@ export interface VoiceConnectionState {
|
||||
switchActiveDevice: (kind: VoiceDeviceKind, deviceId: string) => Promise<void>;
|
||||
/** Личная громкость участника, 0–100: хранится в предпочтениях клиента. */
|
||||
setVolume: (userId: string, volume: number) => void;
|
||||
setParticipantMuted: (userId: string, muted: boolean) => Promise<void>;
|
||||
setParticipantDeafened: (userId: string, deafened: boolean) => Promise<void>;
|
||||
moveParticipant: (userId: string, channelId: string) => Promise<void>;
|
||||
/** Серверный мьют участника: право `MUTE_MEMBERS` (модерация без входа в комнату). */
|
||||
setParticipantMuted: (guildId: string, userId: string, muted: boolean) => Promise<void>;
|
||||
/** Серверное глушение участника: право `DEAFEN_MEMBERS`. */
|
||||
setParticipantDeafened: (guildId: string, userId: string, deafened: boolean) => Promise<void>;
|
||||
/** Перемещение участника: право `MOVE_MEMBERS`. */
|
||||
moveParticipant: (guildId: string, userId: string, channelId: string) => Promise<void>;
|
||||
/** Переносит серверные флаги (server_mute/server_deaf) в локальную сессию. */
|
||||
syncServerState: () => void;
|
||||
dismissSpeakingWarning: () => void;
|
||||
@@ -485,11 +488,7 @@ export const useVoiceConnectionStore = create<VoiceConnectionState>((set, get) =
|
||||
}
|
||||
},
|
||||
|
||||
setParticipantMuted: async (userId, muted) => {
|
||||
const guildId = get().guildId;
|
||||
if (guildId === null) {
|
||||
return;
|
||||
}
|
||||
setParticipantMuted: async (guildId, userId, muted) => {
|
||||
try {
|
||||
const states = await moderateVoiceState(guildId, userId, { server_mute: muted });
|
||||
useSessionStore.getState().setGuildVoiceStates(guildId, states);
|
||||
@@ -499,11 +498,7 @@ export const useVoiceConnectionStore = create<VoiceConnectionState>((set, get) =
|
||||
}
|
||||
},
|
||||
|
||||
setParticipantDeafened: async (userId, deafened) => {
|
||||
const guildId = get().guildId;
|
||||
if (guildId === null) {
|
||||
return;
|
||||
}
|
||||
setParticipantDeafened: async (guildId, userId, deafened) => {
|
||||
try {
|
||||
const states = await moderateVoiceState(guildId, userId, { server_deaf: deafened });
|
||||
useSessionStore.getState().setGuildVoiceStates(guildId, states);
|
||||
@@ -513,11 +508,7 @@ export const useVoiceConnectionStore = create<VoiceConnectionState>((set, get) =
|
||||
}
|
||||
},
|
||||
|
||||
moveParticipant: async (userId, channelId) => {
|
||||
const guildId = get().guildId;
|
||||
if (guildId === null) {
|
||||
return;
|
||||
}
|
||||
moveParticipant: async (guildId, userId, channelId) => {
|
||||
try {
|
||||
const states = await moveVoiceMember(guildId, userId, channelId);
|
||||
useSessionStore.getState().setGuildVoiceStates(guildId, states);
|
||||
|
||||
Reference in New Issue
Block a user