mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-01 00:40:43 +01:00
tagging.defaultTagがundefinedのケース
This commit is contained in:
parent
fe7f54cfe5
commit
57d2368ba5
2 changed files with 5 additions and 5 deletions
|
@ -322,8 +322,8 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
|
||||
// デフォルトハッシュタグ処理
|
||||
if (['public', 'home'].includes(data.visibility)) {
|
||||
if (this.config.tagging.defaultTag != null) {
|
||||
const tag = `#${this.config.tagging.defaultTag}`;
|
||||
if (this.config.tagging?.defaultTag != null) {
|
||||
const tag = `#${this.config.tagging?.defaultTag}`;
|
||||
if (String(data.text).match(tag)) {
|
||||
data.text = `${data.text}\n\n${tag}`;
|
||||
}
|
||||
|
@ -924,9 +924,9 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
}
|
||||
|
||||
// デフォルトハッシュタグ
|
||||
if (this.config.tagging.defaultTag != null) {
|
||||
if (this.config.tagging?.defaultTag != null) {
|
||||
const noteTags = note.tags ? note.tags.map((t: string) => t.toLowerCase()) : [];
|
||||
if (note.visibility === 'public' && noteTags.includes(normalizeForSearch(this.config.tagging.defaultTag))) {
|
||||
if (note.visibility === 'public' && noteTags.includes(normalizeForSearch(this.config.tagging?.defaultTag))) {
|
||||
this.fanoutTimelineService.push('localTimelineWithReplies', note.id, 300, r);
|
||||
this.fanoutTimelineService.push('localTimeline', note.id, 1000, r);
|
||||
if (note.fileIds.length > 0) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue