feat: Add game activity status (Experimental)
All checks were successful
Queue Release Build / prepare (push) Successful in 21s
Deploy Web Apps / deploy (push) Successful in 5m14s
Queue Release Build / build-windows (push) Successful in 16m18s
Queue Release Build / build-linux (push) Successful in 29m20s
Queue Release Build / finalize (push) Successful in 36s

This commit is contained in:
2026-04-27 05:46:33 +02:00
parent 3858beb28e
commit 66c6f34cd3
52 changed files with 2120 additions and 113 deletions

View File

@@ -13,6 +13,7 @@ require coordination.
| `message.models.ts` | `Message`, `Reaction`, `DELETED_MESSAGE_CONTENT` |
| `moderation.models.ts` | `BanEntry` |
| `voice-state.models.ts` | `VoiceState`, `ScreenShareState` |
| `game-activity.models.ts` | `GameActivity`, `MatchedGame`, game-match API response contract |
| `chat-events.ts` | `ChatEventType`, `ChatEvent`, `ChatInventoryItem` |
| `direct-message-contracts.ts` | `DirectMessage`, delivery status, P2P DM event payloads |
| `media-preferences.ts` | `LatencyProfile`, `ScreenShareQuality`, quality presets |

View File

@@ -7,6 +7,7 @@ import type {
Channel
} from './room.models';
import type { VoiceState } from './voice-state.models';
import type { GameActivity } from './game-activity.models';
import type { BanEntry } from './moderation.models';
import type { ChatAttachmentAnnouncement, ChatAttachmentMeta } from './attachment-contracts';
import type {
@@ -66,6 +67,7 @@ export interface ChatEventBase {
settings?: Partial<RoomSettings>;
permissions?: Partial<RoomPermissions>;
voiceState?: Partial<VoiceState>;
gameActivity?: GameActivity | null;
isScreenSharing?: boolean;
isCameraEnabled?: boolean;
icon?: string;
@@ -237,6 +239,11 @@ export interface CameraStateEvent extends ChatEventBase {
isCameraEnabled: boolean;
}
export interface GameActivityEvent extends ChatEventBase {
type: 'game-activity';
gameActivity: GameActivity | null;
}
export interface VoiceStateRequestEvent extends ChatEventBase {
type: 'voice-state-request';
}
@@ -410,6 +417,7 @@ export type ChatEvent =
| VoiceChannelMoveEvent
| ScreenStateEvent
| CameraStateEvent
| GameActivityEvent
| VoiceStateRequestEvent
| StateRequestEvent
| ScreenShareRequestEvent

View File

@@ -0,0 +1,28 @@
export interface GameActivity {
id: string;
name: string;
iconUrl?: string;
store?: GameStoreLink;
startedAt: number;
}
export interface GameStoreLink {
id?: string;
name: string;
slug?: string;
domain?: string;
url: string;
}
export interface MatchedGame {
id: string;
name: string;
iconUrl?: string;
store?: GameStoreLink;
processName: string;
}
export interface GameMatchResponse {
games: MatchedGame[];
rateLimited?: boolean;
}

View File

@@ -4,6 +4,7 @@ export * from './access-control.models';
export * from './message.models';
export * from './moderation.models';
export * from './voice-state.models';
export * from './game-activity.models';
export * from './direct-message-contracts';
export * from './chat-events';
export * from './media-preferences';

View File

@@ -3,6 +3,7 @@ import type {
VoiceState,
ScreenShareState
} from './voice-state.models';
import type { GameActivity } from './game-activity.models';
export type UserStatus = 'online' | 'away' | 'busy' | 'offline' | 'disconnected';
@@ -30,6 +31,7 @@ export interface User {
voiceState?: VoiceState;
screenShareState?: ScreenShareState;
cameraState?: CameraState;
gameActivity?: GameActivity;
}
export interface RoomMember {