400-881-9892

文档中心

官方文档,可查阅产品介绍、快速入门、用户指南、开发指南、API参考、SDK参考、帮助等信息。

文档中心 互动课堂

Large-scale Room

    Large-scale Room

    1.  Large-scale rooms can be created in the background.

    2.  When the number of users in a one-to-many room reaches 100, the room will automatically upgrade to a large room. You can listen to msgName in the -(void)onRemotePubMsg(String id, String name, long ts, String dataJson, boolean inList, String fromId, String associatedMsgId, String associatedUserId) callback. If it is “BigRoom”, it indicates that the room has been upgraded to a large room.

    3.  The following interfaces are effective only when called in the context of a large room.

    getUserList
    • A brief description - Get the user list

    • Interface Name

    - (int)Map<String, RoomUser> getUserList(RequestUserListParams params, boolean isSyncGet, final OnGetUserListListener listListener);

    • Parameters
    Parameter Name Required Type Description
    params Yes RequestUserListParams Acquisition rules
    isSyncGet Yes boolean Whether it is synchronous
    listListener Yes OnGetUserListListener Return data interface
    • Return Value Description
    Type Description
    int 0: Indicates successful invocation; Non-zero: Indicates invocation failure
    getRoomUserNum
    • A brief description - Get the number of specific users in the large room

    Search for users based on user roles, then match user nicknames, and return the number of users. The request result is returned through onGetRoomUserNumBack(int errorCode, int num).

    • Interface Name

    - (int)getRoomUserNum(int[] role, String search);

    • Parameters
    Parameter Name Required Type Description
    role Yes Array Array of user roles
    search No NSString Search condition: Match only user nicknames
    • Return Value Description
    Type Description
    int 0: Indicates successful invocation; Non-zero: Indicates invocation failure
    batchChangeUserProperty
    • A brief description - In a large room, change the attributes of specified users in batches

    • Interface Name

    1
    2
    - (int)batchChangeUserProperty(String[] peers, String tellWhom, HashMap<String, Object> property);
    - (int)batchChangeUserProperty(String[] peers, String tellWhom, HashMap<String, Object> property, HashMap<String, Object> opt);
    
    • Parameters
    Parameter Name Required Type Description
    peerIDs Yes Array User ID
    tellWhom Yes String The object to which this modification signal needs to be notified. It can be a specific user ID, indicating that this signal is sent only to that user
    property Yes Map The attributes of the user being modified
    opt No Map Extended information
    • Return Value Description
    Type Description
    int 0: Indicates successful invocation; Non-zero: Indicates invocation failure
    changeUserPropertyByRole
    • A brief description - In a large room, change the attributes of users with a specified role

    • Interface Name

    1
    2
    - (int)changeUserPropertyByRole(int[] roles, String tellWhom, HashMap<String, Object> property);
    - (int)changeUserPropertyByRole(int[] roles, String tellWhom, HashMap<String, Object> property, HashMap<String, Object> opt);
    
    • Parameters
    Parameter Name Required Type Description
    roles Yes Array User role
    tellWhom No String The object to which this modification signal needs to be notified. It can be a specific user ID, indicating that this signal is sent only to that user
    property Yes Map The attributes of the user being modified
    opt Yes Map Extended information
    • Return Value Description
    Type Description
    int 0: Indicates successful invocation; Non-zero: Indicates invocation failure