Skip to content

Commit

Permalink
feat(backend): likeOnlyなどでハートにフォールバックする際異体字セレクタがない方に揃える (misskey-dev#…
Browse files Browse the repository at this point in the history
…13299)

* feat(backend): likeOnlyなどでハートにフォールバックする際異体字セレクタがない方に揃える

close misskey-dev#13298

* Update ReactionService.ts

* chore(backend): prefer single quote for string literal
  • Loading branch information
KisaragiEffective authored and AyumuNekozuki committed Feb 16, 2024
1 parent f441e0b commit f78b718
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/backend/src/core/ReactionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string> = {
'like': '👍',
'love': '', // ここに記述する場合は異体字セレクタを入れない
'love': '\u2764', // ハート、異体字セレクタを入れない
'laugh': '😆',
'hmm': '🤔',
'surprise': '😮',
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit f78b718

Please sign in to comment.