1
0
Fork 0
mirror of https://github.com/paricafe/misskey.git synced 2025-03-23 11:39:25 -05:00

backend: lint ReactionService

This commit is contained in:
FLY_MC 2025-03-12 01:13:03 +08:00
parent fac7f92682
commit aaab387060

View file

@ -355,8 +355,8 @@ export class ReactionService {
*/
@bindThis
public convertLegacyReaction(reaction: string): string {
reaction = this.decodeReaction(reaction).reaction;
if (Object.keys(legacies).includes(reaction)) return legacies[reaction];
const decodedReaction = this.decodeReaction(reaction).reaction;
if (Object.keys(legacies).includes(decodedReaction)) return legacies[decodedReaction];
return reaction;
}
@ -417,10 +417,10 @@ export class ReactionService {
if (custom) {
const name = custom[1];
const host = custom[2] ?? null;
const host = custom[2];
return {
reaction: `:${name}@${host ?? '.'}:`, // ローカル分は@以降を省略するのではなく.にする
reaction: `:${name}@${host || '.'}:`, // ローカル分は@以降を省略するのではなく.にする
name,
host,
};