diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index 5e888d2673..4770069a18 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -118,9 +118,9 @@ export default class extends Endpoint { // eslint- .leftJoinAndSelect('renote.user', 'renoteUser') .leftJoinAndSelect('note.channel', 'channel'); - if (ps.withCats) { - query.andWhere('(select "isCat" from "user" where id = note."userId")'); - } + if (ps.withCats) { + query.andWhere('(select "isCat" from "user" where id = note."userId")'); + } redisTimeline = await query.getMany(); diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index 2f595f53b3..42d928b481 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -111,7 +111,7 @@ export default class extends Endpoint { // eslint- includeLocalRenotes: ps.includeLocalRenotes, withFiles: ps.withFiles, withRenotes: ps.withRenotes, - withCats: ps.withCats, + withCats: ps.withCats, }, me); } @@ -175,7 +175,7 @@ export default class extends Endpoint { // eslint- includeLocalRenotes: ps.includeLocalRenotes, withFiles: ps.withFiles, withRenotes: ps.withRenotes, - withCats: ps.withCats, + withCats: ps.withCats, }, me); } else { return []; @@ -274,9 +274,9 @@ export default class extends Endpoint { // eslint- query.andWhere('note.fileIds != \'{}\''); } - if (ps.withCats) { - query.andWhere('(select "isCat" from "user" where id = note."userId")'); - } + if (ps.withCats) { + query.andWhere('(select "isCat" from "user" where id = note."userId")'); + } //#endregion const timeline = await query.limit(ps.limit).getMany(); diff --git a/packages/frontend/src/components/MkPostFormSimple.vue b/packages/frontend/src/components/MkPostFormSimple.vue index 1e883e0726..1e8863ac10 100644 --- a/packages/frontend/src/components/MkPostFormSimple.vue +++ b/packages/frontend/src/components/MkPostFormSimple.vue @@ -827,15 +827,15 @@ async function post(ev?: MouseEvent) { } // plugin - if (notePostInterruptors.length > 0) { - for (const interruptor of notePostInterruptors) { - try { - postData = await interruptor.handler(deepClone(postData)); - } catch (err) { - console.error(err); - } - } - } + if (notePostInterruptors.length > 0) { + for (const interruptor of notePostInterruptors) { + try { + postData = await interruptor.handler(deepClone(postData)); + } catch (err) { + console.error(err); + } + } + } let token = undefined; diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue index fb5ab16807..e96fac8a6a 100644 --- a/packages/frontend/src/components/MkTimeline.vue +++ b/packages/frontend/src/components/MkTimeline.vue @@ -188,7 +188,7 @@ function updatePaginationQuery() { query = { withRenotes: props.withRenotes, withFiles: props.onlyFiles ? true : undefined, - withCats: props.onlyCats, + withCats: props.onlyCats, }; } else if (props.src === 'local') { endpoint = 'notes/local-timeline'; @@ -196,7 +196,7 @@ function updatePaginationQuery() { withRenotes: props.withRenotes, withReplies: props.withReplies, withFiles: props.onlyFiles ? true : undefined, - withCats: props.onlyCats, + withCats: props.onlyCats, }; } else if (props.src === 'social') { endpoint = 'notes/hybrid-timeline'; @@ -204,14 +204,14 @@ function updatePaginationQuery() { withRenotes: props.withRenotes, withReplies: props.withReplies, withFiles: props.onlyFiles ? true : undefined, - withCats: props.onlyCats, + withCats: props.onlyCats, }; } else if (props.src === 'global') { endpoint = 'notes/global-timeline'; query = { withRenotes: props.withRenotes, withFiles: props.onlyFiles ? true : undefined, - withCats: props.onlyCats, + withCats: props.onlyCats, }; } else if (props.src === 'mentions') { endpoint = 'notes/mentions'; @@ -225,7 +225,7 @@ function updatePaginationQuery() { endpoint = 'notes/user-list-timeline'; query = { withFiles: props.onlyFiles ? true : undefined, - withCats: props.onlyCats, + withCats: props.onlyCats, listId: props.list, }; } else if (props.src === 'channel') { diff --git a/packages/frontend/src/components/global/MkTime.vue b/packages/frontend/src/components/global/MkTime.vue index 30665cb143..bbafd5ee40 100644 --- a/packages/frontend/src/components/global/MkTime.vue +++ b/packages/frontend/src/components/global/MkTime.vue @@ -53,7 +53,7 @@ const relative = $computed(() => { ago < -3600 ? i18n.t('_timeIn.hours', { n: Math.round(-ago / 3600).toString() }) : ago < -60 ? i18n.t('_timeIn.minutes', { n: (~~(-ago / 60)).toString() }) : i18n.t('_timeIn.seconds', { n: (~~(-ago % 60)).toString() }) - ); + ); } else { return ( ago >= 31536000 ? i18n.t('_ago.yearsAgo', { n: Math.round(ago / 31536000).toString() }) : @@ -71,7 +71,7 @@ const relative = $computed(() => { ago < -3600 ? i18n.t('_timeIn.hours', { n: Math.round(-ago / 3600).toString() }) : ago < -60 ? i18n.t('_timeIn.minutes', { n: (~~(-ago / 60)).toString() }) : i18n.t('_timeIn.seconds', { n: (~~(-ago % 60)).toString() }) - ); + ); } });