edgeport - v1.0.6
    Preparing search index...

    Function sendChat

    • Sends a single chat message in one call: connect, authenticate, send, close.

      Convenience for a fire-and-forget notification from a request-scoped Worker where you do not need to stay connected. Presence is announced before sending so servers deliver to available contacts.

      Parameters

      • opts: XmppConnectOptions & {
            body: string;
            subject?: string;
            to: string;
            type?: string;
        }

        Connection/credential options plus the recipient to and message body.

      Returns Promise<string>

      The sent message id.

      If the credentials are rejected.

      If the connection cannot be established.

      1.0.4

      import { sendChat } from 'edgeport/xmpp';

      await sendChat({
      jid: 'bot@example.com',
      password: env.XMPP_PW,
      to: 'ops@example.com',
      body: 'deploy finished'
      });