feat(P5A.T5): composer Watch-Together button + bubble dispatch

This commit is contained in:
byGalax
2026-05-16 21:30:22 +02:00
parent 7d5f3b37cd
commit ecbd11e369
3 changed files with 150 additions and 1 deletions
@@ -5,6 +5,7 @@ import {
type DecryptedMessage,
type PollOption,
type WhiteboardPayload,
type WatchTogetherPayload,
} from '@chat-app/shared/chat';
export type AttachmentBucket = 'media' | 'audio' | 'files';
@@ -107,6 +108,15 @@ export function createWhiteboardPayload(whiteboardId: string): string {
return serializeMessagePayload(payload);
}
export function createWatchTogetherPayload(sessionId: string): string {
const payload: WatchTogetherPayload = {
v: 1,
type: 'watch_together',
session_id: sessionId,
};
return serializeMessagePayload(payload);
}
export function summarizePollVotes(
options: PollOption[],
reactions: ReactionSummaryInput[],