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:
@@ -136,6 +136,10 @@ pub(crate) async fn rm(ctx: &Ctx, feed: &str) -> Result<()> {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
};
|
};
|
||||||
ctx.store_cfg(cfg).await?;
|
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.
|
// State and files stay: re-adding the feed should not re-download its back catalogue.
|
||||||
println!("removed {feed}; downloads and history kept");
|
println!("removed {feed}; downloads and history kept");
|
||||||
retire_group(ctx, feed, Some(&parent)).await?;
|
retire_group(ctx, feed, Some(&parent)).await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user