fix(channels): only show the detail-page tag editor on subscribed channels

attach_tag/detach_tag call _user_subscription, which 404s for a channel you don't
follow — but the tag control was rendered for any non-demo channel, so tagging an
un-subscribed/explored channel popped a global error + reverted the optimistic add.
Gate the control on ch.subscribed (personal tags are for your subscriptions anyway).
This commit is contained in:
2026-07-30 23:33:50 +02:00
parent 56f95fa626
commit 3352d0095c
+4 -1
View File
@@ -445,7 +445,10 @@ export default function ChannelPage({
{t("channel.subscribe")}
</button>
))}
{ch && !me.is_demo && (
{/* Tagging is a subscription-scoped action (attach_tag → _user_subscription 404s
otherwise), and personal tags are for your subscriptions — so only offer it on a
channel you actually follow. */}
{ch?.subscribed && !me.is_demo && (
<ChannelTagsControl
userTags={userTags}
attachedIds={ch.tag_ids}