wacrm/src/components/flows
Arnas Donauskas 312683ca05
feat(inbox): send photo, video, document & voice in chat (#213)
Agents can now attach a photo/video/document or record a voice note in
the inbox composer and send it live in a 1:1 thread — previously media
could only be received from customers or sent via the Flows builder.

- 023_chat_media.sql: new account-scoped `chat-media` Storage bucket
  (mirrors flow-media RLS from 020) plus Meta-accepted audio MIME types.
- meta-api: sendMediaMessage gains an `audio` kind (link-only — Meta
  rejects caption/filename on audio; WhatsApp renders OGG/Opus as a
  voice note).
- /api/whatsapp/send: media branch reusing the phone-variant retry loop.
- /api/whatsapp/transcode-audio: Node-runtime route remuxing the
  WebM/Opus that Chromium's MediaRecorder produces to OGG/Opus via
  ffmpeg-static (Firefox/Safari record accepted formats and skip it).
- composer: attach menu, file pickers, voice recorder + auto-transcode,
  preview with caption; thread: optimistic handleSendMedia.
- shared uploadAccountMedia helper (flows form refactored onto it).
- next.config: allow microphone=(self) (was fully blocked) + CSP
  media-src; document optional FFMPEG_PATH override.

Tests: meta-api audio payload shape, buildMediaPath, audio-transcode
helpers (14 new). typecheck/lint/build green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 10:07:16 +03:00
..
forms feat(inbox): send photo, video, document & voice in chat (#213) 2026-06-18 10:07:16 +03:00
flow-builder.tsx feat(theme): add light/dark mode toggle (#243) 2026-06-16 17:29:46 +03:00
flow-canvas.tsx feat(theme): add light/dark mode toggle (#243) 2026-06-16 17:29:46 +03:00
flow-editor-shell.tsx feat(theme): add light/dark mode toggle (#243) 2026-06-16 17:29:46 +03:00
flow-editor-state.test.ts fix: keep auto-layout hydration clean 2026-05-31 21:49:14 +05:30
flow-editor-state.tsx fix: keep auto-layout hydration clean 2026-05-31 21:49:14 +05:30
header.tsx feat(theme): add light/dark mode toggle (#243) 2026-06-16 17:29:46 +03:00
shared.tsx feat(theme): add light/dark mode toggle (#243) 2026-06-16 17:29:46 +03:00
validation-panel.tsx feat(theme): add light/dark mode toggle (#243) 2026-06-16 17:29:46 +03:00