ddd test
This commit is contained in:
23
src/app/domains/voice-session/domain/voice-session.logic.ts
Normal file
23
src/app/domains/voice-session/domain/voice-session.logic.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { Room } from '../../../core/models';
|
||||
import type { VoiceSessionInfo } from './voice-session.models';
|
||||
|
||||
export function isViewingVoiceSessionServer(
|
||||
session: VoiceSessionInfo | null,
|
||||
currentServerId: string | null
|
||||
): boolean {
|
||||
return !session || currentServerId === session.serverId;
|
||||
}
|
||||
|
||||
export function buildVoiceSessionRoom(session: VoiceSessionInfo): Room {
|
||||
return {
|
||||
id: session.serverId,
|
||||
name: session.serverName,
|
||||
description: session.serverDescription,
|
||||
hostId: '',
|
||||
isPrivate: false,
|
||||
createdAt: 0,
|
||||
userCount: 0,
|
||||
maxUsers: 50,
|
||||
icon: session.serverIcon
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user