Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface UtilsInterface

工具函数定义

Hierarchy

  • UtilsInterface

Implemented by

Index

Methods

  • deprecated

    废弃,合并方法参见文档:

    去除accounts对应的好友

    Parameters

    Returns NIMFriendProfile[]

  • deprecated

    废弃,合并方法参见文档:

    去除accounts对应的群成员

    Parameters

    Returns NIMTeamMember[]

  • deprecated

    废弃,合并方法参见文档:

    在关系数组里面根据 account 找到对应的

    Parameters

    Returns null | NIMFriendProfile

  • deprecated

    废弃,合并方法参见文档:

    在消息数组里面根据 idClient 找到对应的

    Parameters

    • arr1: NIMMessage[]

      消息数组

    • idClient: string

      待查找的 idClient

    Returns null | NIMMessage

  • deprecated

    废弃,合并方法参见文档:

    在关系数组里面根据 account 找到对应的关系

    Parameters

    • arr1: NIMStrAnyObj[]

      关系数组

    • account: string

      待查找的关系的 account

    Returns null | NIMStrAnyObj

  • deprecated

    废弃,合并方法参见文档:

    在会话数组里面根据 id 找到对应的

    Parameters

    Returns null | NIMSession

  • deprecated

    废弃,合并方法参见文档:

    在消息数组里面根据 idServer 找到对应的

    Parameters

    • arr1: NIMSystemMessage[]

      系统消息数组

    • idServer: string

      待查找的 idServer

    Returns null | NIMSystemMessage

  • deprecated

    废弃,合并方法参见文档:

    在群数组里面根据 teamId 找到对应的

    Parameters

    • arr1: NIMTeam[]

      群数组

    • teamId: string

      待查找的 teamId

    Returns null | NIMTeam

  • deprecated

    废弃,合并方法参见文档:

    在群成员数组里面根据 id 找到对应的

    Parameters

    • arr1: NIMTeamMember[]

      群成员数组

    • id: string

      待查找的成员的 id

    Returns null | NIMTeamMember

  • deprecated

    废弃,合并方法参见文档:

    在用户名片数组里面根据 account 找到对应的

    Parameters

    • arr1: NIMUserNameCard[]

      用户名片数组

    • account: string

      待查找的 account

    Returns null | NIMUserNameCard

  • searchLocal(options: { keyPath?: "session" | "session.lastMsg.type" | "session.id" | "session.scene" | "session.lastMsg.text" | "session.localCustom" | "session.target.account" | "session.target.nick" | "session.target.alias" | "session.target.name" | "user" | "user.account" | "user.nick" | "user.alias"; keyword: string; done?: any }): void
  • deprecated

    由于数据库只能提供正向索引的方式查找,查找效率低,建议放弃使用

    搜索本地会话和本地好友

    注:该接口需要数据库支持,若没有开启本地数据库能力,done 回调里只会返回空

    Parameters

    • options: { keyPath?: "session" | "session.lastMsg.type" | "session.id" | "session.scene" | "session.lastMsg.text" | "session.localCustom" | "session.target.account" | "session.target.nick" | "session.target.alias" | "session.target.name" | "user" | "user.account" | "user.nick" | "user.alias"; keyword: string; done?: any }
      • Optional keyPath?: "session" | "session.lastMsg.type" | "session.id" | "session.scene" | "session.lastMsg.text" | "session.localCustom" | "session.target.account" | "session.target.nick" | "session.target.alias" | "session.target.name" | "user" | "user.account" | "user.nick" | "user.alias"

        搜索路径。若不填写则搜索下面所有的字段

      • keyword: string

        搜索关键词

      • done?:function

    Returns void