# publish method

Future <Result<PubSubError, bool>> publish(

1. JID jid,
2. String node,
3. XMLNode payload,
4. {String? id,
5. PubSubPublishOptions? options}

)

Publish `payload` to the PubSub node `node` on JID `jid`. Returns true if it was successful. False otherwise.

## Implementation

    Future<Result<PubSubError, bool>> publish(
      JID jid,
      String node,
      XMLNode payload, {
      String? id,
      PubSubPublishOptions? options,
    }) async {
      return _publish(
        jid,
        node,
        payload,
        id: id,
        options: options,
      );
    }