How to use the @cometchat-pro/react-native-chat.CometChat.blockUsers function in @cometchat-pro/react-native-chat

To help you get started, we’ve selected a few @cometchat-pro/react-native-chat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cometchat-pro-samples / react-native-chat-app / chatApp / src / HomeScreen.js View on Github external
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);
            });
        }
        
    }