From 147e8f1e3e81bc1359d1793a0f00d8a48f36ef28 Mon Sep 17 00:00:00 2001 From: Kisaragi <48310258+KisaragiEffective@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:25:48 +0900 Subject: [PATCH] =?UTF-8?q?feat(backend):=20likeOnly=E3=81=AA=E3=81=A9?= =?UTF-8?q?=E3=81=A7=E3=83=8F=E3=83=BC=E3=83=88=E3=81=AB=E3=83=95=E3=82=A9?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=83=90=E3=83=83=E3=82=AF=E3=81=99=E3=82=8B?= =?UTF-8?q?=E9=9A=9B=E7=95=B0=E4=BD=93=E5=AD=97=E3=82=BB=E3=83=AC=E3=82=AF?= =?UTF-8?q?=E3=82=BF=E3=81=8C=E3=81=AA=E3=81=84=E6=96=B9=E3=81=AB=E6=8F=83?= =?UTF-8?q?=E3=81=88=E3=82=8B=20(#13299)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(backend): likeOnlyなどでハートにフォールバックする際異体字セレクタがない方に揃える close #13298 * Update ReactionService.ts * chore(backend): prefer single quote for string literal --- packages/backend/src/core/ReactionService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/core/ReactionService.ts b/packages/backend/src/core/ReactionService.ts index 5c79ac6e05..5014156a5c 100644 --- a/packages/backend/src/core/ReactionService.ts +++ b/packages/backend/src/core/ReactionService.ts @@ -30,12 +30,12 @@ import { RoleService } from '@/core/RoleService.js'; import { FeaturedService } from '@/core/FeaturedService.js'; import { trackPromise } from '@/misc/promise-tracker.js'; -const FALLBACK = '❤'; +const FALLBACK = '\u2764'; const PER_NOTE_REACTION_USER_PAIR_CACHE_MAX = 16; const legacies: Record = { 'like': '👍', - 'love': '❤', // ここに記述する場合は異体字セレクタを入れない + 'love': '\u2764', // ハート、異体字セレクタを入れない 'laugh': '😆', 'hmm': '🤔', 'surprise': '😮', @@ -120,7 +120,7 @@ export class ReactionService { let reaction = _reaction ?? FALLBACK; if (note.reactionAcceptance === 'likeOnly' || ((note.reactionAcceptance === 'likeOnlyForRemote' || note.reactionAcceptance === 'nonSensitiveOnlyForLocalLikeOnlyForRemote') && (user.host != null))) { - reaction = '❤️'; + reaction = '\u2764'; } else if (_reaction) { const custom = reaction.match(isCustomEmojiRegexp); if (custom) {