Grant current user permission to be added to a buddy list.
If the SmartFoxServer Pro 1.6.0 advanced security mode is used (see the SmartFoxServer server-side configuration), when a user wants to add a buddy to his/her buddy list, a permission request is sent to the buddy.
Once the SFSEvent..::.OnBuddyPermissionRequestDelegate event is received, this method must be used by the buddy to grant or refuse permission. When the permission is granted, the requester's buddy list is updated.
If the SmartFoxServer Pro 1.6.0 advanced security mode is used (see the SmartFoxServer server-side configuration), when a user wants to add a buddy to his/her buddy list, a permission request is sent to the buddy.
Once the SFSEvent..::.OnBuddyPermissionRequestDelegate event is received, this method must be used by the buddy to grant or refuse permission. When the permission is granted, the requester's buddy list is updated.


Sends:
SFSEvent..::.OnBuddyPermissionRequestDelegate
Since:
SmartFoxServer Pro v1.6.0
Version:
SmartFoxServer Pro

The following example shows how to grant permission to be added to a buddy list once request is received.
CopyC#

SFSEvent.onBuddyPermissionRequest += OnBuddyPermissionRequest; bool autoGrantPermission = true; public void OnBuddyPermissionRequest(string sender, string message) { if (autoGrantPermission) { // Automatically grant permission smartFox.SendBuddyPermissionResponse(true, sender); } else { // Display a popup containing grant/refuse buttons } }