Automerge Repo - v2.5.2-alpha.0
    Preparing search index...

    Class PeerPresenceView<State>

    A summary of the latest Presence information for the set of peers who have reported a Presence status to us.

    Type Parameters

    • State
    Index

    Methods

    • Get all recently-seen peers for this device.

      Parameters

      • deviceId: unknown

      Returns undefined | PeerId[]

      Array of peer ids for this device

    • Get all recently-seen devices.

      Returns unknown[]

      Array of device ids

    • Get current ephemeral state value for this device's most-recently-active peer. See getPeerState.

      Type Parameters

      • Channel extends string | number | symbol

      Parameters

      • deviceId: unknown
      • Optionalchannel: Channel

      Returns undefined | State | NonNullable<State>[Channel]

    • Get most-recently-seen peer from this group.

      Parameters

      Returns undefined | PeerId

      id of most recently seen peer

    • Check when the peer was last seen.

      Parameters

      Returns undefined | number

      last seen UNIX timestamp, or undefined for unknown peers

    • Get current

      Parameters

      Returns undefined | PeerState<State>

      details for the peer

    • Get all recently-seen peers.

      Returns PeerId[]

      Array of peer ids

    • Get current ephemeral state value for this peer. If a channel is specified, only returns the ephemeral state for that specific channel. Otherwise, returns the full ephemeral state.

      Type Parameters

      • Channel extends string | number | symbol

      Parameters

      Returns undefined | State | NonNullable<State>[Channel]

      latest ephemeral state received

    • Get all recently-seen peers for this user.

      Parameters

      • userId: unknown

      Returns undefined | PeerId[]

      Array of peer ids for this user

    • Get all recently-seen users.

      Returns unknown[]

      Array of user ids

    • Get current ephemeral state value for this user's most-recently-active peer. See getPeerState.

      Type Parameters

      • Channel extends string | number | symbol

      Parameters

      • userId: unknown
      • Optionalchannel: Channel

      Returns undefined | State | NonNullable<State>[Channel]

    • Check if peer is currently present.

      Parameters

      Returns boolean

      true if the peer has been seen recently