Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

addPresenceListener

  • description

    Add presence listener callback that gets invoked with presence events whenever a user updates an attributes, joins, leaves or timeouts a channel

    async
    since

    2.41.0

    example
    function onPresenceListener({event, message}){
    // custom logic
    }
    addPresenceListener({ channel: "<your channel identifier>" }, onPresenceListener)

    Parameters

    Returns Promise<void>

getPresenceChannelUsers

getPresenceUserAttributes

  • description

    Get user attributes for a given user in a channel.

    async
    since

    2.41.0

    example
    getPresenceUserAttributes().then(attributes => console.log(attributes))
    

    Parameters

    Returns Promise<PresenceAttributes>

getPresenceUserChannels

  • description

    Get list of channels in which a given user is present.

    async
    since

    2.41.0

    example
    getPresenceUserChannels({
    userProfileId: "<user profile id>"
    }).then(res => console.log(res))

    Parameters

    Returns Promise<IPresenceChannelsResponse>

joinPresenceChannel

  • description

    Join a presence channel.

    async
    since

    2.41.0

    example
    joinPresenceChannel({
    channel: "<your channel identifier>",
    }).then(res => console.log(res))

    Parameters

    Returns Promise<void>

leavePresenceChannel

  • description

    Leave a presence channel.

    async
    since

    2.41.0

    example
    leavePresenceChannel({
    channel: "<your channel identifier>",
    }).then(res => console.log(res))

    Parameters

    Returns Promise<void>

removePresenceListener

  • description

    Remove an added presence listener callback

    async
    since

    2.41.0

    example
    function onPresenceListener({event, message}){
    // custom logic
    }
    removePresenceListener({ channel: "<your channel identifier>" }, onPresenceListener)

    Parameters

    Returns Promise<void>

setPresenceUserAttributes

  • description

    Set user presence attributes for current user profile in a given channel.

    async
    since

    2.41.0

    example
    setPresenceUserAttributes({
    channel: "<your channel identifier>",
    attributes: { mood: "Happy", location: "Vacation" }
    }).then(attributes => console.log(attributes))

    Parameters

    Returns Promise<PresenceAttributes>

Legend

  • Namespace
  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Interface
  • Interface with type parameter
  • Enumeration

Generated using TypeDoc