feat(bot): Case insensitive proxy tags matching (#490)
This commit is contained in:
@@ -17,6 +17,7 @@ public class SystemConfigPatch: PatchObject
|
||||
public Partial<int?> MemberLimitOverride { get; set; }
|
||||
public Partial<int?> GroupLimitOverride { get; set; }
|
||||
public Partial<string[]> DescriptionTemplates { get; set; }
|
||||
public Partial<bool> CaseSensitiveProxyTags { get; set; }
|
||||
|
||||
|
||||
public override Query Apply(Query q) => q.ApplyPatch(wrapper => wrapper
|
||||
@@ -29,6 +30,7 @@ public class SystemConfigPatch: PatchObject
|
||||
.With("member_limit_override", MemberLimitOverride)
|
||||
.With("group_limit_override", GroupLimitOverride)
|
||||
.With("description_templates", DescriptionTemplates)
|
||||
.With("case_sensitive_proxy_tags", CaseSensitiveProxyTags)
|
||||
);
|
||||
|
||||
public new void AssertIsValid()
|
||||
@@ -78,6 +80,9 @@ public class SystemConfigPatch: PatchObject
|
||||
if (DescriptionTemplates.IsPresent)
|
||||
o.Add("description_templates", JArray.FromObject(DescriptionTemplates.Value));
|
||||
|
||||
if (CaseSensitiveProxyTags.IsPresent)
|
||||
o.Add("case_sensitive_proxy_tags", CaseSensitiveProxyTags.Value);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
@@ -103,6 +108,9 @@ public class SystemConfigPatch: PatchObject
|
||||
if (o.ContainsKey("description_templates"))
|
||||
patch.DescriptionTemplates = o.Value<JArray>("description_templates").Select(x => x.Value<string>()).ToArray();
|
||||
|
||||
if (o.ContainsKey("case_sensitive_proxy_tags"))
|
||||
patch.CaseSensitiveProxyTags = o.Value<bool>("case_sensitive_proxy_tags");
|
||||
|
||||
return patch;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user