tagging.defaultTagがundefinedのケース

This commit is contained in:
Tatsuya Koishi 2024-01-28 10:52:50 +09:00
parent 167f90f0b9
commit 5d853f0e01
3 changed files with 3 additions and 3 deletions

View File

@ -201,7 +201,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
const config = loadConfig();
const defaultTag: string | null = config.tagging.defaultTag;
const defaultTag: string | null = config.tagging?.defaultTag;
if (defaultTag == null) {
qb.orWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)');
} else {

View File

@ -152,7 +152,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
withReplies: boolean,
}, me: MiLocalUser | null) {
const config = loadConfig();
const defaultTag: string | null = config.tagging.defaultTag;
const defaultTag: string | null = config.tagging?.defaultTag;
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'),
ps.sinceId, ps.untilId)
.andWhere(new Brackets(qb => {

View File

@ -47,7 +47,7 @@ class HybridTimelineChannel extends Channel {
this.withReplies = params.withReplies ?? false;
this.withFiles = params.withFiles ?? false;
const config = loadConfig();
this.defaultTag = config.tagging.defaultTag;
this.defaultTag = config.tagging?.defaultTag;
// Subscribe events
this.subscriber.on('notesStream', this.onNote);