mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-07-25 06:14:50 +02:00
Fix(backend): フォロワー限定投稿へのリプライをホーム投稿に出来る問題を修正 (#17747)
* fix: reply note visibility check * docs(changelog): update changelog * fix: wrong operator * docs(changelog): fix insert position and wording --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
@@ -61,6 +61,7 @@
|
||||
- Fix: ハッシュタグに関連するデータを更新する際のエラーハンドリングを修正
|
||||
- Fix: Sentry 使用環境下にて、Misskey が発行した SQL クエリが span に含まれない問題を修正
|
||||
- Fix: Sentry 使用環境下にて、外部送信リクエストへ `sentry-trace` / `baggage` ヘッダーが既定で付与されないように
|
||||
- Fix: フォロワー限定投稿へのリプライをホーム投稿に出来る問題を修正
|
||||
- Fix: ファイルをアップロードするAPIにて、処理終了後に一時ファイルが削除されないことがある問題を修正
|
||||
|
||||
## 2026.6.0
|
||||
|
||||
@@ -520,6 +520,11 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||
// specified / direct noteはreject
|
||||
throw new Error('Renote target is not public or home');
|
||||
}
|
||||
|
||||
// ローカルのみをRenoteしたらローカルのみにする
|
||||
if (data.renote.localOnly && data.channel == null) {
|
||||
data.localOnly = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Check blocking
|
||||
@@ -534,19 +539,35 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||
}
|
||||
}
|
||||
|
||||
// 返信対象がpublicではないならhomeにする
|
||||
if (data.reply && data.reply.visibility !== 'public' && data.visibility === 'public') {
|
||||
data.visibility = 'home';
|
||||
}
|
||||
if (data.reply) {
|
||||
switch (data.reply.visibility) {
|
||||
case 'public':
|
||||
// public noteは無条件にreply可能
|
||||
break;
|
||||
case 'home':
|
||||
// home noteはhome以下にreply可能
|
||||
if (data.visibility === 'public') {
|
||||
data.visibility = 'home';
|
||||
}
|
||||
break;
|
||||
case 'followers':
|
||||
// followers noteはfollowers以下にreply可能
|
||||
if (data.visibility === 'public' || data.visibility === 'home') {
|
||||
data.visibility = 'followers';
|
||||
}
|
||||
break;
|
||||
case 'specified':
|
||||
// specified / direct noteはspecifiedのみreply可能
|
||||
if (data.visibility !== 'specified') {
|
||||
data.visibility = 'specified';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// ローカルのみをRenoteしたらローカルのみにする
|
||||
if (data.renote && data.renote.localOnly && data.channel == null) {
|
||||
data.localOnly = true;
|
||||
}
|
||||
|
||||
// ローカルのみにリプライしたらローカルのみにする
|
||||
if (data.reply && data.reply.localOnly && data.channel == null) {
|
||||
data.localOnly = true;
|
||||
// ローカルのみにリプライしたらローカルのみにする
|
||||
if (data.reply.localOnly && data.channel == null) {
|
||||
data.localOnly = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (data.text) {
|
||||
|
||||
Reference in New Issue
Block a user