Release Notes
Announcements
Remain Friends.chat.addToBlacklist(options);
options parameter is of the Object type. It contains the following attribute values:Name | Type | Description |
userIDList | Array | List of userID values of the users to be added to the blocklist. The number of userID values cannot exceed 1,000 per request. |
Promiselet promise = chat.addToBlacklist({userIDList: ['user1', 'user2']});promise.then(function(imResponse) {console.log(imResponse.data);console.warn('addToBlacklist error:', imError); // Failed to add the user to the blocklist});
chat.removeFromBlacklist(options);
options parameter is of the Object type. It contains the following attribute values:Name | Type | Description |
userIDList | Array | List of userID values of the users to be removed from the blocklist. The number of userID values cannot exceed 1,000 per request. |
Promiselet promise = chat.removeFromBlacklist({userIDList: ['user1', 'user2']});console.log(imResponse.data);console.warn('removeFromBlacklist error:', imError); // Failed to remove the user from the blocklist});
chat.getBlacklist();
Promiselet promise = chat.getBlacklist();promise.then(function(imResponse) {console.log(imResponse.data);}).catch(function(imError) {console.warn('getBlacklist error:', imError); // Failed to obtain the blocklist});
TencentCloudChat.EVENT.BLACKLIST_UPDATED event.let onBlacklistUpdated = function(event) {console.log(event.data);};chat.on(TencentCloudChat.EVENT.BLACKLIST_UPDATED, onBlacklistUpdated);
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback