METHOD_BlockContact
This method notifies
BEMS
that the user wants to block a contact on the user's contact list. Users can block users that are a part of their contact list as well as those that are not a part of the contact list. Parameter | Type | Required | Description |
---|---|---|---|
contactId | String | √ | This parameter specifies the user ID of the user to block in the contact list. If a user blocks another user, the user that initiates the block doesn't receive ContactUpdate notifications for the blocked user. However, if the user has other active sessions with the blocked user, they still receive ContactUpdates for the blocked user in those sessions. The user can get the blocked user's status by searching for their contact details. |
dependencies | String | — | This parameter specifies the other methods that this method is dependent on. |
BEMS response and notification
BEMS
response and notification The following table describes the parameters that
BEMS
returns and the notification sent to the BlackBerry Connect
app when the contact is blocked.Parameter | Type | Description |
---|---|---|
method | String | This parameter specifies the invoked method (for example, BlockContact). |
state | String | This parameter specifies the state of the request to BEMS (for example, Processing or Complete). |
Code example
The following example sends a request to
BEMS
to block "user33" in the BlackBerry Connect
app contact list.{ "id":"c12", "method":"BlockContact", "params": { "contactIds":{"user33@example.com}" }, "id":"c55", "jsonrpc":"2.0" }
If the request is successful,
BEMS
sends the following response to the BlackBerry Connect
app and processes the request.{ "id":"c55", "error":null, "result": { "data": { "method":"BlockContact", "state":"PROCESSING" } }, "jsonrpc":"2.0" "background": true }
If there are no errors,
BEMS
sends the following notification to the BlackBerry Connect
app and the contact is blocked. { "id": "c55", "sequence":1018548300000029, "result": { "data": { "method":"BlockContact", "state":"COMPLETE" } }, "jsonrpc":"2.0" }