From 7c1de507688bc3b7b05f1597c9283139e86dae95 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Fri, 23 Feb 2024 04:22:16 +0100 Subject: [PATCH] [backend/core] Whitespace-only content warning should be reset to null --- Iceshrimp.Backend/Core/Services/NoteService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Iceshrimp.Backend/Core/Services/NoteService.cs b/Iceshrimp.Backend/Core/Services/NoteService.cs index 550c55ef..9011e6d0 100644 --- a/Iceshrimp.Backend/Core/Services/NoteService.cs +++ b/Iceshrimp.Backend/Core/Services/NoteService.cs @@ -69,6 +69,9 @@ public class NoteService( if (attachments != null && attachments.Any(p => p.UserId != user.Id)) throw GracefulException.BadRequest("Refusing to create note with files belonging to someone else"); + if (cw != null && string.IsNullOrWhiteSpace(cw)) + cw = null; + var note = new Note { Id = IdHelpers.GenerateSlowflakeId(),