@urth/metatell-sdk - v0.1.0
    Preparing search index...

    Interface ChatMessage

    A chat message delivered to or sent from the room.

    import { onMessage } from "@urth/metatell-sdk/chat";

    onMessage((m) => {
    console.log(`${m.from.displayName}: ${m.text}`);
    });
    interface ChatMessage {
        channel: "global" | "group";
        from: { displayName: string; sessionId: string };
        groupId?: string;
        id: string;
        mentions: Mention[];
        replyTo?: string;
        sentAt: number;
        text: string;
    }
    Index
    channel: "global" | "group"

    Channel the message belongs to.

    from: { displayName: string; sessionId: string }

    The sender's session id and display name.

    groupId?: string

    Group id, set only when channel is "group".

    id: string

    Unique id of the message.

    mentions: Mention[]

    Mentions parsed from text.

    replyTo?: string

    Id of the message this one replies to, if it is a reply.

    sentAt: number

    Send time as a Unix timestamp in milliseconds.

    text: string

    The raw message text, including any mention markup.