Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • NIMChatroomMemberInterface

Implemented by

Index

Methods

  • getChatroomMemberCountByTag(_options: { tag: string; done: any }): void
  • getChatroomMembers(_options: { guest: boolean; limit?: number; onlyOnline?: boolean; time?: number; done: any }): void
  • Get the list of members in a chat room.

    Parameters

    • _options: { guest: boolean; limit?: number; onlyOnline?: boolean; time?: number; done: any }
      • guest: boolean

        Whether the user is a guest

      • Optional limit?: number

        for pagination, default value: 100.

      • Optional onlyOnline?: boolean

        Whether to only query online members. This parameter is only valid when guest = false

      • Optional time?: number

        Start time for pagination; query the list of members after this time in reverse order

        • Do not fill out for the first time, the default value 0 represents the current server time to get the first page
        • For the second page and beyond, fill in the updateTime of the last member of the last page
      • done:function

    Returns void

  • getChatroomMembersByTag(_options: { limit?: number; tag: string; time?: number; done: any }): void
  • Get the members of a chat room by tag

    Parameters

    • _options: { limit?: number; tag: string; time?: number; done: any }
      • Optional limit?: number

        for pagination, default value: 100.

      • tag: string

        Tag. Get the list of members with the tag.

      • Optional time?: number

        Start time for pagination; query the list of members after this time in reverse order

        • Do not fill out for the first time, the default value 0 represents the current server time to get the first page
        • For the second page and beyond, fill in the enterTime of the last member of the last page
      • done:function

    Returns void

  • getChatroomMembersInfo(_options: { accounts: string[]; done: any }): void
  • kickChatroomMember(_options: { account: string; custom?: string; done?: any }): void
  • Remove a member from the chat room.

    • If a member is removed from the chat room, other members receive a notification of type attach.type === 'kickMember'.
    • The removed members get notified by the ondisconnect callback, callback code = 'kicked'

    Parameters

    • _options: { account: string; custom?: string; done?: any }
      • account: string

        removed account

      • Optional custom?: string

        Custom information It is recommended to use JSON format. For data other than JSON format, the web client will receive the data but will be ignored by other clients.

      • done?:function

    Returns void

  • markChatroomBlacklist(_options: { account: string; custom?: string; isAdd: boolean; done: any }): void
  • Add a member to the blocklist

    • If a member is added to the blocklist, other members in the chat room receive a notification of type attach.type === 'blackMember'.
    • If a member is removed from the blocklist, other members in the chat room receive a notification of type attach.type === 'unblackMember' .
    • Members in the blocklist get notified by the ondisconnect callback, callback code = 'kicked', reason = 'blacked'
    • Members in the blocklist cannot join the chat room

    Parameters

    • _options: { account: string; custom?: string; isAdd: boolean; done: any }

    Returns void

  • markChatroomCommonMember(_options: { account: string; custom?: string; isAdd: boolean; level?: number; done: any }): void
  • markChatroomGaglist(_options: { account: string; custom?: string; isAdd: boolean; done: any }): void
  • Add a member to the list of muted members

    • If a member is added to the list of muted members, other members receive a notification of type attach.type === 'gagMember'.
    • If a member is removed from the list of muted members, other members in the chat room receive a notification of type attach.type === 'ungagMember'.
    • Members in the list cannot send messages

    Associated function

    Parameters

    • _options: { account: string; custom?: string; isAdd: boolean; done: any }

    Returns void

  • markChatroomIdentity(_options: { account: string; custom?: string; identity: string; isAdd: boolean; done: any }): void
  • markChatroomManager(_options: { account: string; custom?: string; isAdd: boolean; done: any }): void
  • updateChatroomMemberTempMute(_options: { account: string; custom?: string; duration: number; needNotify: boolean; done?: any }): void
  • Temporarily mute a member in a chat room. If needNotify === true, the members will receive the notification of attach.type === addTempMute

    Parameters

    • _options: { account: string; custom?: string; duration: number; needNotify: boolean; done?: any }
      • account: string

        Account

      • Optional custom?: string

        extension field of notifications

      • duration: number

        Mute duration in seconds. If the value is set to 0, a member is unmuted

      • needNotify: boolean

        Whether a notification is required.

      • done?:function

    Returns void

  • updateTagMembersTempMute(_options: { custom?: string; duration: number; needNotify: boolean; notifyTargetTags?: string; tag: string; done?: any }): void
  • Temporarily mute a member based on the tag. If needNotify === true, the members will receive the notification of attach.type === addTempMuteTag

    Parameters

    • _options: { custom?: string; duration: number; needNotify: boolean; notifyTargetTags?: string; tag: string; done?: any }
      • Optional custom?: string

        extension field of notifications

      • duration: number

        Mute duration in seconds. If the value is set to 0, a member is unmuted

      • needNotify: boolean

        Whether a notification is required.

      • Optional notifyTargetTags?: string

        The target tag of the broadcast message, the default value is options.tag

      • tag: string

        Mute members with a specified tag

      • done?:function

    Returns void