초기커밋
This commit is contained in:
34
ServerCommon/Helper/UserBlockHelper.cs
Normal file
34
ServerCommon/Helper/UserBlockHelper.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user