kernl API
    Preparing search index...

    Function summarizePublish

    • Fold the servers' answers to one publish into an outcome. A server that answered more than once counts once, and an acceptance wins over a refusal, because the event is on that server either way.

      Parameters

      • responses: readonly PublishAnswer[]

        The answers RelayPool.publish resolved with.

      Returns PublishOutcome

      Who accepted, who refused and why, and whether anyone accepted.

      const outcome = summarizePublish(await pool.publish(relays, event));
      outcome.ok; // true when 2 of 3 accepted