feat(P4B.T6): composer 'Whiteboard' button creates board + sends bubble

This commit is contained in:
byGalax
2026-05-16 20:36:03 +02:00
parent 5e59ee22f6
commit 383245ec90
2 changed files with 63 additions and 1 deletions
@@ -4,6 +4,7 @@ import {
type AttachmentHandle,
type DecryptedMessage,
type PollOption,
type WhiteboardPayload,
} from '@chat-app/shared/chat';
export type AttachmentBucket = 'media' | 'audio' | 'files';
@@ -97,6 +98,15 @@ export function createPollPayload(question: string, optionTexts: string[]): stri
});
}
export function createWhiteboardPayload(whiteboardId: string): string {
const payload: WhiteboardPayload = {
v: 1,
type: 'whiteboard',
whiteboard_id: whiteboardId,
};
return serializeMessagePayload(payload);
}
export function summarizePollVotes(
options: PollOption[],
reactions: ReactionSummaryInput[],