make the linter happy

This commit is contained in:
dakkar 2024-05-11 13:40:28 +01:00
parent 8cb2cb057a
commit a81be17d69
2 changed files with 13 additions and 13 deletions

View File

@ -90,7 +90,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const addedEmoji = await this.customEmojiService.add({
driveFile,
name: nameNfc,
category: emoji.category?.normalize('NFC'),
category: emoji.category?.normalize('NFC') ?? null,
aliases: emoji.aliases?.map(a => a.normalize('NFC')),
host: null,
license: emoji.license,

View File

@ -46,21 +46,21 @@ export function checkWordMute(note: Note, me: MeDetailed | null | undefined, mut
function getNoteText(note: Note): string {
const textParts: string[] = [];
if (note.cw)
textParts.push(note.cw);
if (note.cw) textParts.push(note.cw);
if (note.text)
textParts.push(note.text);
if (note.text) textParts.push(note.text);
if (note.files)
for (const file of note.files)
if (file.comment)
textParts.push(file.comment);
if (note.files) {
for (const file of note.files) {
if (file.comment) textParts.push(file.comment);
}
}
if (note.poll)
for (const choice of note.poll.choices)
if (choice.text)
textParts.push(choice.text);
if (note.poll) {
for (const choice of note.poll.choices) {
if (choice.text) textParts.push(choice.text);
}
}
return textParts.join('\n').trim();
}