BlockBuddyRequest

Blocks or unblocks a Buddy in the Buddy List of the User. Blocked Buddies can't send messages or requests to the User.


In order to block a Buddy, the User must be online in the Buddy List System. If the operation is successful, the operation is confirmed by the SFSBuddyEvent.BUDDY_BLOCK; otherwise the SFSBuddyEvent.BUDDY_ERROR event is fired.

This request can be sent if the Buddy List System is already initialized (see the InitBuddyListRequest class description).

Constructor

new BlockBuddyRequest(buddyName, blocked)

Creates a new instance of the BlockBuddyRequest class.
Pass the instance to the SmartFox#send method to validate and execute the request.
Parameters:
NameTypeDescription
buddyNamestringThe name of the Buddy to be blocked or unblocked.
blockedbooleanIf true, the Buddy is blocked; if false, the Buddy is unblocked.