mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 07:25:12 +00:00
make the linter happy
This commit is contained in:
parent
8cb2cb057a
commit
a81be17d69
2 changed files with 13 additions and 13 deletions
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue