From e2fc7decad5d735a52bf77903074cb7ab1926515 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 23 Dec 2018 03:25:33 +0900 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E6=96=87=E3=81=8B=E3=82=89=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=82=B7=E3=83=A7=E3=83=B3=E7=AD=89=E3=82=92=E5=B1=95?= =?UTF-8?q?=E9=96=8B=E3=81=97=E3=81=AA=E3=81=84=E3=82=AA=E3=83=97=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=20(#3721)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/endpoints/notes/create.ts | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/server/api/endpoints/notes/create.ts b/src/server/api/endpoints/notes/create.ts index fd1fb3922c..fa4388b687 100644 --- a/src/server/api/endpoints/notes/create.ts +++ b/src/server/api/endpoints/notes/create.ts @@ -82,6 +82,30 @@ export const meta = { } }, + noExtractMentions: { + validator: $.bool.optional, + default: false, + desc: { + 'ja-JP': '本文からメンションを展開しないか否か。' + } + }, + + noExtractHashtags: { + validator: $.bool.optional, + default: false, + desc: { + 'ja-JP': '本文からハッシュタグを展開しないか否か。' + } + }, + + noExtractEmojis: { + validator: $.bool.optional, + default: false, + desc: { + 'ja-JP': '本文からカスタム絵文字を展開しないか否か。' + } + }, + geo: { validator: $.obj({ coordinates: $.arr().length(2) @@ -237,6 +261,9 @@ export default define(meta, (ps, user, app) => new Promise(async (res, rej) => { localOnly: ps.localOnly, visibility: ps.visibility, visibleUsers, + apMentions: ps.noExtractMentions ? [] : undefined, + apHashtags: ps.noExtractHashtags ? [] : undefined, + apEmojis: ps.noExtractEmojis ? [] : undefined, geo: ps.geo }) .then(note => pack(note, user))