From c31d2e256318df04505e4cf22994001d2d4eaf0a Mon Sep 17 00:00:00 2001
From: ozelot <contact@ozelot.dev>
Date: Fri, 3 Nov 2023 17:52:31 +0900
Subject:  fix(frontend):
 サイレンス状態で公開範囲のパブリックを選択できてしまう問題を修正 (#12224)
 (#12225)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* fix(frontend): サイレンス状態で公開範囲のパブリックを選択できてしまう問題を修正 (#12224)

* docs: update changelog

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
---
 packages/frontend/src/components/MkPostForm.vue | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'packages/frontend/src/components/MkPostForm.vue')

diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index 46faae9523..c0fd1c14d7 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -299,6 +299,10 @@ if (props.reply && props.reply.text != null) {
 	}
 }
 
+if ($i?.isSilenced && visibility === 'public') {
+	visibility = 'home';
+}
+
 if (props.channel) {
 	visibility = 'public';
 	localOnly = true; // TODO: チャンネルが連合するようになった折には消す
@@ -448,6 +452,7 @@ function setVisibility() {
 
 	os.popup(defineAsyncComponent(() => import('@/components/MkVisibilityPicker.vue')), {
 		currentVisibility: visibility,
+		isSilenced: $i?.isSilenced,
 		localOnly: localOnly,
 		src: visibilityButton,
 	}, {
-- 
cgit v1.2.3-freya

