METHOD_PC_LeaveRoom

This method sends a request to BEMS for the user to leave a group discussion room that they are a member or following. The user must be a member of the group discussion or the room privacy must be open to follow.

The following table describes the parameters that you can include in this method.

Parameter

Type

Required

Description

roomId

String

√

This parameter specifies the ID of the group discussion that the user wants to leave.

Code example

The following example sends a request to BEMS to leave a group discussion that they are a member of.

{
 "method":"pc.LeaveRoom",
 "params":
   {
    "roomId":"ma-chan://gems.example.com/25ac15e7-9bff-4e78-9261-6e08aa43231e"
   },
 "id":"c5",
 "jsonrpc":"2.0"
}

If the request is successful, BEMS sends the following response to the BlackBerry Connect app and processes the request.

{
  "id":"c5",
  "error":null,
  "result":
   {
    "data":
     {
       "method":"pc.LeaveRoom",
       "state":"PROCESSING"
     }
   },
 "jsonrpc":"2.0",
 "background":false
}

If there are no errors, BEMS sends the following notification to the BlackBerry Connect app and the user leaves the group discussion.

{
  "id":"c5",
  "error":null,
  "result":
   {
     "data":
      {
        "method":"pc.LeaveRoom",
        "state":"COMPLETE"
      }
   },
  "jsonrpc":"2.0"
}