From 81570f0290c26094ea9845152d69a8478de74115 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 4 Aug 2018 01:09:00 +0900 Subject: [PATCH] Trim text --- src/services/note/create.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 20dfc78c0..64556c160 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -103,6 +103,10 @@ export default async (user: IUser, data: Option, silent = false) => new Promise< data.visibleUsers = data.visibleUsers.filter(x => x != null); } + if (data.text) { + data.text = data.text.trim(); + } + // Parse MFM const tokens = data.text ? parse(data.text) : [];