Before you begin
- Register a QuickBlox account. This is a matter of a few minutes and you will be able to use this account to build your apps.
- Configure QuickBlox SDK for your app. Check out Setup page for more details. 3. Create a user session to be able to use QuickBlox functionality. See Authentication page to learn how to do it.
- Connect to the Chat server. See Connection page to learn how to do it.
The user can have multiple privacy lists, but only one can be active.
Create privacy list
A privacy list must have at least one element in order to be created. You can choose a type of blocked logic. There are 2 types:- Block in one way. When you blocked a user, but you can send messages to them.
- Block in two ways. When you blocked a user, but you can’t send messages to them.
JavaScript
In order to be used the privacy list should be not only set but also activated (set as default).
Activate privacy list
In order to activate rules from a privacy list you should set it as default.JavaScript
Update privacy list
There is a rule you should follow to update a privacy list: if you want to update or set a new privacy list instead of the current one, you should decline the current default list first.JavaScript
Retrieve privacy lists
To get a list of all your privacy lists names, use the following request.JavaScript
Retrieve privacy list by name
To get the privacy list by name, you should use the following method.JavaScript
Remove privacy list
To delete a list, you can call a method below or you can edit a list and set items tonil
.
JavaScript
Blocked user attempts to communicate with user
A user can be blocked in 1-1 dialog and group dialog. In this case, the blocked user receives an error when trying to send a message in a 1-1 dialog and receives nothing when trying to send a message in group dialog.JavaScript