[backend/core] Trim whitespace around note text & cw (ISH-150)
This commit is contained in:
parent
52a7f90697
commit
aaec212a08
1 changed files with 4 additions and 3 deletions
|
@ -98,8 +98,8 @@ public class NoteService(
|
|||
var note = new Note
|
||||
{
|
||||
Id = IdHelpers.GenerateSlowflakeId(),
|
||||
Text = text,
|
||||
Cw = cw,
|
||||
Text = text?.Trim(),
|
||||
Cw = cw?.Trim(),
|
||||
Reply = reply,
|
||||
ReplyUserId = reply?.UserId,
|
||||
ReplyUserHost = reply?.UserHost,
|
||||
|
@ -244,7 +244,8 @@ public class NoteService(
|
|||
text = mentionsResolver.ResolveMentions(text, null, mentions, splitDomainMapping);
|
||||
|
||||
mentionedLocalUserIds = mentionedLocalUserIds.Except(previousMentionedLocalUserIds).ToList();
|
||||
note.Text = text;
|
||||
note.Text = text?.Trim();
|
||||
note.Cw = cw?.Trim();
|
||||
note.Tags = ResolveHashtags(text);
|
||||
|
||||
if (text is not null)
|
||||
|
|
Loading…
Add table
Reference in a new issue