Skip to main content

Block User

Blocks message reception from a specific user in chat. Messages from the blocked user will remain blocked until the block is removed.

Call Information

Chat.BlockPlayerAdd(string blockUserId, string blockUserName, PlayNANOODelegate callback) {}

Call Details

ParameterDescriptionType
blockUserIdBlocked user identification IDstring
blockUserNameBlocked user name or nicknamestring
callbackCommunication ResultPlayNANOODelegate

Source Code

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

void Awake()
{
plugin = Plugin.GetInstance();

string blockUserId = "string";
string blockUserName = "string";
plugin.Chat.BlockPlayerAdd(blockUserId, blockUserName, OnChatBlockPlayerAddCallback);
}

void OnChatBlockPlayerAddCallback(string status, string errorCode, string jsonString, Dictionary<string, object> values)
{
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(values["Status"]);
}
else
{
Debug.Log("Fail");
}
}
}

Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Status" : "String"
}

Response Details

Data KeyDescriptionType
StatusProcessing resultstring