feat(P5B.T6): composer Spielen button + bubble dispatch + game-picker
Wires mini-game entry points: createGamePayload helper in conversationFeatures.ts (GamePayload import added), game state/handler/picker-dialog/modal-mount/open-event-listener in ConversationPage.tsx (DM-only guard uses conversation.members[].userId camelCase as confirmed), and parsed.kind==='game' bubble branch in MessageBubble.tsx dispatching chatapp:open-game CustomEvent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
type PollOption,
|
||||
type WhiteboardPayload,
|
||||
type WatchTogetherPayload,
|
||||
type GamePayload,
|
||||
} from '@chat-app/shared/chat';
|
||||
|
||||
export type AttachmentBucket = 'media' | 'audio' | 'files';
|
||||
@@ -117,6 +118,16 @@ export function createWatchTogetherPayload(sessionId: string): string {
|
||||
return serializeMessagePayload(payload);
|
||||
}
|
||||
|
||||
export function createGamePayload(gameId: string, gameType: 'ttt' | 'c4'): string {
|
||||
const payload: GamePayload = {
|
||||
v: 1,
|
||||
type: 'game',
|
||||
game_id: gameId,
|
||||
game_type: gameType,
|
||||
};
|
||||
return serializeMessagePayload(payload);
|
||||
}
|
||||
|
||||
export function summarizePollVotes(
|
||||
options: PollOption[],
|
||||
reactions: ReactionSummaryInput[],
|
||||
|
||||
Reference in New Issue
Block a user