Options
All
  • Public
  • Public/Protected
  • All
Menu

云端会话服务 API 定义

注:SessionInterface 是本地会话,而 CloudSessionInterface 是远端会话。远端会话需要开通服务才能使用。

Hierarchy

  • CloudSessionInterface

Implemented by

Index

Methods

  • deleteServerSessions(options: { sessions: { scene: "p2p" | "team" | "superTeam"; to: string }[]; done: any }): void
  • 删除云端会话列表

    • 删除后不可恢复,其他端也不能再拉取到,直至会话重新被产生

    Parameters

    Returns void

  • getServerSession(options: { scene: "p2p" | "team" | "superTeam"; to: string; done: any }): void
  • getServerSessions(options: { limit?: number; maxTimestamp?: number; minTimestamp?: number; needLastMsg?: boolean; done: any }): void
  • 查询云端会话列表

    Parameters

    • options: { limit?: number; maxTimestamp?: number; minTimestamp?: number; needLastMsg?: boolean; done: any }
      • Optional limit?: number

        分页大小,默认 100

      • Optional maxTimestamp?: number

        最大的时间戳。与 minTimestamp 组成一个时间段作为查询条件。

        默认当前时间戳

      • Optional minTimestamp?: number

        最小的时间戳。与 maxTimestamp 组成一个时间段作为查询条件。

        默认 0 表示不限制。

      • Optional needLastMsg?: boolean

        是否需要返回 last msg。默认 true

      • done:function

    Returns void

  • updateServerSession(options: { extra: string; scene: "p2p" | "team" | "superTeam"; to: string; done: any }): void
  • 更新服务器上某个会话的扩展字段

    Parameters

    • options: { extra: string; scene: "p2p" | "team" | "superTeam"; to: string; done: any }
      • extra: string

        扩展字段,仅自己可见

      • scene: "p2p" | "team" | "superTeam"

        消息的场景

      • to: string

        消息接收者

      • done:function

    Returns void