mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-22 20:53:08 +02:00
feat(backend): likeOnlyなどでハートにフォールバックする際異体字セレクタがない方に揃える (#13299)
* feat(backend): likeOnlyなどでハートにフォールバックする際異体字セレクタがない方に揃える close #13298 * Update ReactionService.ts * chore(backend): prefer single quote for string literal
This commit is contained in:
parent
0c10d2aa64
commit
147e8f1e3e
1 changed files with 3 additions and 3 deletions
|
@ -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': '😮',
|
||||
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue