• Parse

    Parameters

    • text: string

      The raw message text.

    Returns Mention[]

    The mentions found, with their display text and character offsets.

    Mentions

    out of chat message text.

    Mentions are encoded as [@display](sessionId).

    Example

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

    parseMentions("hi [@Alice](a1b2c3d4)"); // [{ sessionId, display, start, end }]