デフォルトハッシュタグタイムライン

This commit is contained in:
Tatsuya Koishi 2024-01-28 00:11:04 +09:00
parent de32e55ee4
commit bc3899f56f
5 changed files with 18 additions and 11 deletions

View file

@ -201,7 +201,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
const config = loadConfig();
let 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();
let 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

@ -24,7 +24,7 @@ class HybridTimelineChannel extends Channel {
private withRenotes: boolean;
private withReplies: boolean;
private withFiles: boolean;
private defaultTag: string;
private defaultTag: string | null;
constructor(
private metaService: MetaService,
@ -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);

View file

@ -22,7 +22,7 @@ class LocalTimelineChannel extends Channel {
private withRenotes: boolean;
private withReplies: boolean;
private withFiles: boolean;
private defaultTag: string;
private defaultTag: string | null;
constructor(
private metaService: MetaService,
@ -45,7 +45,7 @@ class LocalTimelineChannel 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);