Fix newline rendering in embeds on iOS

This commit is contained in:
Ske
2020-02-20 22:57:37 +01:00
parent 456fe8f7af
commit de141d629b
4 changed files with 14 additions and 6 deletions

View File

@@ -53,7 +53,7 @@ namespace PluralKit.Bot
if (ctx.System == null) throw Errors.NoSystemError;
if (target.System != ctx.System.Id) throw Errors.NotOwnMemberError;
var description = ctx.RemainderOrNull();
var description = ctx.RemainderOrNull()?.NormalizeLineEndSpacing();
if (description.IsLongerThan(Limits.MaxDescriptionLength)) throw Errors.DescriptionTooLongError(description.Length);
target.Description = description;

View File

@@ -38,7 +38,7 @@ namespace PluralKit.Bot
public async Task Description(Context ctx) {
ctx.CheckSystem();
var newDescription = ctx.RemainderOrNull();
var newDescription = ctx.RemainderOrNull()?.NormalizeLineEndSpacing();
if (newDescription != null && newDescription.Length > Limits.MaxDescriptionLength) throw Errors.DescriptionTooLongError(newDescription.Length);
ctx.System.Description = newDescription;