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
| Parameter | Description | Type |
|---|---|---|
| blockUserId | Blocked user identification ID | string |
| blockUserName | Blocked user name or nickname | string |
| callback | Communication Result | PlayNANOODelegate |
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 Key | Description | Type |
|---|---|---|
| Status | Processing result | string |