Ensuring your user’s preferences about which users are blocked from contacting them is a key piece of providing a safe and secure community for your users to communicate in. When a user is blocked within the Userplane experience, the block is honored immediately. However the persistence of that block is entirely dependent on how you integrate the block list with Userplane. Further the opposite is true that if someone blocks a user on your site it will be necessary to notify Userplane of the change so that we can stay in sync with the users wishes. In implementing the below points you will be accounting for the different ways in which Userplane and your website may need to communicate to provide the best possible experience.
Providing the Existing Block List
Ideally at the beginning of every session you should provide the current state of the block list as you know it. We will honor this list immediately as accurate and use it until the user makes and adjustment or we are notified otherwise.
An array of blocked users
var userID = "user04"; up.api.buddyList.blockUser( userID );
var userID = "user05"; up.api.buddyList.unBlockUser( userID );