setChatRoomEntry

public abstract void setChatRoomEntry(String chatRoomId, String key, String value, boolean sendNotification, boolean autoDelete, String notificationExtra, RongIMClient.OperationCallback callback)

Sets custom attributes for a chatroom.

If the key does not exist, the attribute is added; if the key already exists, only the attribute value set by the current user can be updated.Note: The chatroom status storage feature must be enabled first.

Parameters

chatRoomId

The ID of the chatroom.

key

The name of the chatroom attribute. The key can include uppercase and lowercase letters, numbers, and special characters + = - _. The maximum length is 128 characters.

value

The value corresponding to the chatroom attribute. The maximum length is 4096 characters.

sendNotification

Whether to send a notification. If a notification is sent, the SDK will receive the notification message .

autoDelete

Whether to delete the attribute after exiting the chatroom.

notificationExtra

Custom fields for the notification. This field will be included in the notification message io.rong.imlib.chatroom.message.ChatRoomKVNotiMessage, with a maximum length of 2 KB.

callback

The callback for setting the chatroom attributes.