Options
All
  • Public
  • Public/Protected
  • All
Menu

Presence contains APIs for presence operations.

Index

Functions

  • publishPresence(this: Connection, params: { description: string; error?: any; success?: any }): Promise<void>
  • 发布自定义在线状态。

    connection.publishPresence({description: 'music'})
    

    Parameters

    • this: Connection
    • params: { description: string; error?: any; success?: any }
      • description: string

        在线状态扩展描述信息,可以为空。

      • error?:function
      • success?:function
        • success(): void
        • Returns void

    Returns Promise<void>

  • unsubscribePresence(this: Connection, params: { usernames: string[]; error?: any; success?: any }): Promise<void>
  • 取消订阅指定用户的在线状态。

    connection.unsubscribePresence({usernames: ['user1','user2']})
    

    Parameters

    • this: Connection
    • params: { usernames: string[]; error?: any; success?: any }
      • usernames: string[]

        要取消订阅在线状态的用户 ID 数组。

      • error?:function
      • success?:function
        • success(): void
        • Returns void

    Returns Promise<void>

Generated using TypeDoc