xmpp-httpx - v0.11.0
    Preparing search index...

    Class DiscoCache

    Per-JID cache of a peer's disco#info features — "does it advertise urn:xmpp:http?", and any other feature a caller needs to check first (absolute-form, a tunnel extension).

    Two layers:

    • Passive XEP-0115: presence stanzas carrying map JIDs to a ver; each distinct ver is resolved with ONE disco query and, if the response's recomputed hash matches, the verdict is shared by every JID announcing that ver.
    • Active fallback: a plain disco#info query per JID.

    Errors and timeouts yield "unknown" — many deployments answer disco poorly, so callers proceed optimistically on "unknown" and refuse only on an explicit feature list lacking the namespace.

    Index
    • Parameters

      • Optionaljid: string

      Returns void

    • Whether jid advertises feature; one disco query serves every feature.

      Parameters

      • jid: string
      • feature: string
      • Optionalfrom: string

      Returns Promise<DiscoSupport>