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 config = loadConfig();
const defaultTag: string | null = config.tagging.defaultTag; const defaultTag: string | null = config.tagging?.defaultTag;
if (defaultTag == null) { if (defaultTag == null) {
qb.orWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)'); qb.orWhere('(note.visibility = \'public\') AND (note.userHost IS NULL)');
} else { } else {

View File

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

View File

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