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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RqkrVAJFkEgz9cXG3jG1Zy
This commit is contained in:
2026-11-19 07:33:53 -05:00
parent 6939fd1dcc
commit 349426cbf9

View File

@@ -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?;