feat: add SMTP email support and fix profile/permissions bugs
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
} from 'livekit-client';
|
||||
import { api } from '../lib/api.ts';
|
||||
import { useWebSocketStore } from './ws.ts';
|
||||
import { useAuthStore } from './auth.ts';
|
||||
|
||||
|
||||
export interface VoiceParticipant {
|
||||
identity: string;
|
||||
@@ -201,7 +201,7 @@ export const useVoiceStore = create<VoiceState>((set, get) => ({
|
||||
const wsSend = useWebSocketStore.getState().send;
|
||||
wsSend({
|
||||
type: 'VOICE_JOIN',
|
||||
payload: { room_name: channelId },
|
||||
data: { room_name: channelId },
|
||||
});
|
||||
} catch (err) {
|
||||
set({
|
||||
@@ -220,7 +220,7 @@ export const useVoiceStore = create<VoiceState>((set, get) => ({
|
||||
if (channelId) {
|
||||
wsSend({
|
||||
type: 'VOICE_LEAVE',
|
||||
payload: { room_name: channelId },
|
||||
data: { room_name: channelId },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ export const useVoiceStore = create<VoiceState>((set, get) => ({
|
||||
const wsSend = useWebSocketStore.getState().send;
|
||||
wsSend({
|
||||
type: 'VOICE_MUTE',
|
||||
payload: { room_name: get().currentRoom, muted: newMuted },
|
||||
data: { room_name: get().currentRoom, muted: newMuted },
|
||||
});
|
||||
},
|
||||
|
||||
@@ -285,7 +285,7 @@ export const useVoiceStore = create<VoiceState>((set, get) => ({
|
||||
const wsSend = useWebSocketStore.getState().send;
|
||||
wsSend({
|
||||
type: 'VOICE_DEAFEN',
|
||||
payload: { room_name: get().currentRoom, deafened: newDeafened },
|
||||
data: { room_name: get().currentRoom, deafened: newDeafened },
|
||||
});
|
||||
},
|
||||
|
||||
@@ -335,13 +335,11 @@ export const useVoiceStore = create<VoiceState>((set, get) => ({
|
||||
|
||||
whisperTo: (targetUserId, targetUsername, message) => {
|
||||
const wsSend = useWebSocketStore.getState().send;
|
||||
const me = useAuthStore.getState().user;
|
||||
wsSend({
|
||||
type: 'VOICE_WHISPER',
|
||||
payload: {
|
||||
data: {
|
||||
target_user_id: targetUserId,
|
||||
target_username: targetUsername,
|
||||
from_username: me?.username || 'unknown',
|
||||
message: message || '',
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user