From 349426cbf9501fe18cabd02165308fd481196114 Mon Sep 17 00:00:00 2001 From: rays Date: Thu, 19 Nov 2026 07:33:53 -0500 Subject: [PATCH] ipx rm takes a feed's subscriptions with it (#478) Removing a feed from the catalogue left whoever subscribed to it subscribed, the same leftover a list's dropped feed made: All Subscriptions listed its items with no feed to name them. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01RqkrVAJFkEgz9cXG3jG1Zy --- crates/ipx/src/catalogue.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ipx/src/catalogue.rs b/crates/ipx/src/catalogue.rs index 1bfe71c..c175a53 100644 --- a/crates/ipx/src/catalogue.rs +++ b/crates/ipx/src/catalogue.rs @@ -136,6 +136,10 @@ pub(crate) async fn rm(ctx: &Ctx, feed: &str) -> Result<()> { return Ok(()); }; ctx.store_cfg(cfg).await?; + // Left subscribed, All Subscriptions listed its items with no feed to name them (#478). + for (user, _) in ctx.db.subscribers_of(feed).await? { + ctx.db.unsubscribe(user, feed).await?; + } // State and files stay: re-adding the feed should not re-download its back catalogue. println!("removed {feed}; downloads and history kept"); retire_group(ctx, feed, Some(&parent)).await?;