From 973b6a77eb1858ad380e58f02e56b0ac728699b4 Mon Sep 17 00:00:00 2001 From: maaz519 Date: Thu, 23 Jul 2026 03:06:06 +0530 Subject: [PATCH] feat(messaging-ui): Attachment carries contentRef + sizeBytes for messenger media (0.1.4) Extend the messaging Attachment type with optional storage fields so an adapter's upload() can return a sendable reference (the socket needs contentRef/mimeType/ sizeBytes to persist the message part) while keeping the display url. Enables messenger attachments end-to-end in host adapters. Co-Authored-By: Claude Opus 4.8 --- packages/iios-messaging-ui/package.json | 2 +- packages/iios-messaging-ui/src/types.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/iios-messaging-ui/package.json b/packages/iios-messaging-ui/package.json index 2017e6a..b582f56 100644 --- a/packages/iios-messaging-ui/package.json +++ b/packages/iios-messaging-ui/package.json @@ -1,6 +1,6 @@ { "name": "@insignia/iios-messaging-ui", - "version": "0.1.3", + "version": "0.1.4", "type": "module", "main": "dist/index.js", "module": "dist/index.js", diff --git a/packages/iios-messaging-ui/src/types.ts b/packages/iios-messaging-ui/src/types.ts index 0c1d918..27724a2 100644 --- a/packages/iios-messaging-ui/src/types.ts +++ b/packages/iios-messaging-ui/src/types.ts @@ -48,9 +48,13 @@ export interface Reaction { } export interface Attachment { + /** A resolved URL for display/download. May be empty until resolved by the host. */ url: string; mime: string; name: string; + /** Storage reference — carried so send() can persist the message part (upload returns it). */ + contentRef?: string; + sizeBytes?: number; } export interface Message {