snarfed / bridgy-fed

🌉 A bridge between decentralized social network protocols
https://fed.brid.gy
Creative Commons Zero v1.0 Universal
740 stars 39 forks source link

Bluesky => fediverse: handle `#account` deactivated/deleted events from the firehose #1293

Open snarfed opened 2 months ago

snarfed commented 2 months ago

When we hear over the firehose that a bridged ATProto account has been deactivated or deleted, we should delete its bridged profile in the fediverse.

Background on these firehose events in #1119. Looks like the firehose is sending both #account ... "active": False events and #tombstone events for these accounts, but it will probably eventually drop the #tombstone events.

Tamschi commented 3 weeks ago

I'm not sure whether deactivation should cause a Delete immediately, as that's very destructive while deactivation on Bluesky is not. Even deletions appear to be somewhat reversible on Bluesky, so it would be good to send out a Delete only after a (shorter) delay.

I think to start with, the profile should probably be Updated to only say the account is deactivated, and the bridge should refuse fetches (with a non-recoverable error other than Gone) and not bridge new activities it receives on the firehose while the account isn't active.

snarfed commented 3 weeks ago

Sigh, yeah, agreed. I actually talked about this with Evan and a few other people the other day, I now have "AP Deactivate actor activity" on my todo list to write up and file on https://github.com/w3c/activitypub/issues and/or https://github.com/w3c/activitystreams/issues 😆

snarfed commented 3 weeks ago

^ done, https://github.com/w3c/activitypub/issues/475

snarfed commented 3 weeks ago

When we do this, we should probably delete the ATProto entity we have. #1451 is an example of someone who deleted their Bluesky account, then later created a new account (and DID) and reused the same handle, which we didn't handle well because bridged AP actor handles (and ids) use that handle, ie we're not yet handle-independent.

Tamschi commented 3 weeks ago

For deletions, yes. I think deactivations are safe in this regard because the account still holds onto the handle.

snarfed commented 1 day ago

Related, inspired by https://github.com/snarfed/bridgy-fed/issues/1550#issuecomment-2495923327, we should also consider what to do when we detect that a bridged Bluesky account turns on the "hide from logged-out users" setting, which we normally interpret as opting out.

First, I expect this comes over the firehose as an update to the app.bsky.actor.profile/self record, not an #account or #identity event.

Second, when this happens, should we ignore it and keep bridging the account? Or keep the bridged profile but pause bridging? Or delete the bridged profile entirely? 🤷