Skip to main content

replace_sub_refs

Function replace_sub_refs 

Source
pub async fn replace_sub_refs(
    pool: &SqlitePool,
    did: &str,
    feed_ids: &[i64],
) -> Result<()>
Expand description

Replace the per-DID subscription projection (sub_ref) for did with exactly feed_ids, in one transaction.

Called from the web layer’s subscription-resolve/sync path so sub_ref always mirrors the caller’s current PDS subscription set. This is the authority every scoped read/mutation checks against — a feed the caller no longer subscribes to drops out of their read surface immediately.