35 lines
875 B
C#
35 lines
875 B
C#
using Amazon.DynamoDBv2.DataModel;
|
|
|
|
|
|
using ServerCore;
|
|
using ServerBase;
|
|
|
|
|
|
namespace ServerCommon;
|
|
|
|
public class UserBlockHelper
|
|
{
|
|
public static HashSet<string> convertBlockPolicyToJavaPolicy(List<string> blockPolicy)
|
|
{
|
|
HashSet<string> policies = new();
|
|
foreach (var policy in blockPolicy)
|
|
{
|
|
switch (policy)
|
|
{
|
|
case "Access_Restrictions":
|
|
policies.Add(UserBlockPolicyType.AccessRestrictions.ToString());
|
|
break;
|
|
case "Chatting_Restrictions":
|
|
policies.Add(UserBlockPolicyType.ChattingRestrictions.ToString());
|
|
break;
|
|
|
|
default:
|
|
Log.getLogger($"BlockPolicy not match policy : {policy}");
|
|
break;
|
|
}
|
|
}
|
|
|
|
return policies;
|
|
}
|
|
}
|