METHOD_PC_FollowRooms Skip Navigation


This method sends a request to 
 to follow or unfollow a discussion room. When users follow a group discussion, they automatically join the group discussion and can participate in and receive events associated with the group discussion. 
Followed group discussion rooms are persistent on the instant messaging server, and the followed group discussion rooms list is per user and not per device. This allows lists to be shared across devices and the desktop client. 
The following table describes the parameters that you can include in this method. 
String Array
This parameter specifies a list of group discussion IDs that users can follow and participate in. 
String Array
This parameter specifies a list of group discussion IDs that users can unfollow. When users unfollow a group discussion they stop receiving notifications from the group discussion. 
This parameter specifies one of the following actions: 
  • If true, the list of group discussions on the instant messaging server is replaced with the new list.
  • If false, the instant messaging server adds or removes rooms from the list of group discussions that users are following. 
* If replaceList is true, then the roomsToFollow is required and roomsToUnfollow should not be passed in. If replaceList is false, either the roomsToFollow or roomsToUnfollow parameter must be passed in.

Code example

The following example sends a request to 
 to follow and unfollow specified group discussions.
{ "method":"pc.FollowRooms", "params": { roomsToFollow:[ "ma-chan://", "ma-chan://" ], roomsToUnfollow:[ "ma-chan://", "ma-chan://" ], replaceList: true }, "id":"c5", "jsonrpc":"2.0" }
If the request is successful, 
 sends the following response to the 
BlackBerry Connect
 app and processes the request.
{ "id":"c5", "error":null, "result": { "data": { "method":"pc.FollowRooms", "state":"PROCESSING" } }, "jsonrpc":"2.0" }
If there are no error messages, 
 sends the following notification to the 
BlackBerry Connect
 app and the user follows and unfollows the specified group discussions.
{ "id":"c5", "sequence":1018829700000047, "result": { "data": { "method":"pc.FollowRooms", "state":"COMPLETE" } }, "jsonrpc":"2.0" }