mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-17 03:00:13 +00:00
fix: group dns respect their character limit
This commit is contained in:
parent
9a6254c01f
commit
395cc194a8
1 changed files with 2 additions and 0 deletions
|
|
@ -191,6 +191,8 @@ public class Groups
|
|||
else
|
||||
{
|
||||
var newDisplayName = ctx.RemainderOrNull(false).NormalizeLineEndSpacing();
|
||||
if (newDisplayName.Length > Limits.MaxGroupNameLength)
|
||||
throw new PKError($"Group name too long ({newDisplayName.Length}/{Limits.MaxGroupNameLength} characters).");
|
||||
|
||||
var patch = new GroupPatch { DisplayName = Partial<string>.Present(newDisplayName) };
|
||||
await ctx.Repository.UpdateGroup(target.Id, patch);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue