@gphone/sdk
    Preparing search index...

    Interface UIMessage

    interface UIMessage {
        attachments?: { id?: number; media?: MediaPreview; photo_id?: number }[];
        citizenid: string;
        conversation_id: number;
        created_at: string | Date;
        id: number;
        message: string;
        reply_to_id?: number | null;
        replyToMsg?: UIMessage | null;
        sender: "other" | "me";
        status?: "deleted" | "active" | "moderated";
        updated_at: string | Date;
    }

    Hierarchy

    • Message
      • UIMessage
    Index
    attachments?: { id?: number; media?: MediaPreview; photo_id?: number }[]

    photo_id on the way in, media on the way back.

    It used to be a bare base64 string, which made every attachment a photo by construction — a voice note or a GIF had nowhere to say what it was. media is a projection rather than the whole row for a reason that is not tidiness: a conversation is shared, so embedding the uploader's citizenid would hand it to every other participant. Same reasoning as publicColumns on a public read (§10).

    citizenid: string
    conversation_id: number
    created_at: string | Date
    id: number
    message: string
    reply_to_id?: number | null
    replyToMsg?: UIMessage | null
    sender: "other" | "me"
    status?: "deleted" | "active" | "moderated"
    updated_at: string | Date