Big commit

This commit is contained in:
2026-03-02 00:13:34 +01:00
parent d146138fca
commit 6d7465ff18
54 changed files with 5999 additions and 2291 deletions

View File

@@ -17,9 +17,17 @@ export interface User {
screenShareState?: ScreenShareState;
}
export interface Channel {
id: string;
name: string;
type: 'text' | 'voice';
position: number; // ordering within its type group
}
export interface Message {
id: string;
roomId: string;
channelId?: string; // which text channel the message belongs to (default: 'general')
senderId: string;
senderName: string;
content: string;
@@ -55,6 +63,8 @@ export interface Room {
iconUpdatedAt?: number; // last update timestamp for conflict resolution
// Role-based management permissions
permissions?: RoomPermissions;
// Channels within the server
channels?: Channel[];
}
export interface RoomSettings {
@@ -129,7 +139,7 @@ export interface SignalingMessage {
}
export interface ChatEvent {
type: 'message' | 'chat-message' | 'edit' | 'message-edited' | 'delete' | 'message-deleted' | 'reaction' | 'reaction-added' | 'reaction-removed' | 'kick' | 'ban' | 'room-deleted' | 'room-settings-update' | 'voice-state' | 'voice-state-request' | 'state-request' | 'screen-state';
type: 'message' | 'chat-message' | 'edit' | 'message-edited' | 'delete' | 'message-deleted' | 'reaction' | 'reaction-added' | 'reaction-removed' | 'kick' | 'ban' | 'room-deleted' | 'room-settings-update' | 'voice-state' | 'voice-state-request' | 'state-request' | 'screen-state' | 'role-change' | 'channels-update';
messageId?: string;
message?: Message;
reaction?: Reaction;
@@ -149,6 +159,8 @@ export interface ChatEvent {
settings?: RoomSettings;
voiceState?: Partial<VoiceState>;
isScreenSharing?: boolean;
role?: 'host' | 'admin' | 'moderator' | 'member';
channels?: Channel[];
}
export interface ServerInfo {