Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
blockUser(){
console.log("Block User", this.state.block.uid);
if(this.state.block != ''){
let usersList = [this.state.block.uid];
CometChat.blockUsers(usersList).then(list => {
console.log("users list blocked", { list });
this.setState({block: ''});
this.fetchUser();
}, error => {
console.log("Blocking user fails with error", error);
});
}
}