Open DrewMcArthur opened 5 days ago
fyi i've begun work on this in https://github.com/DrewMcArthur/rsky/issues/3
seems like everything runs, i just have to figure out how to test it.
Sick! I had also started on this but I'll work on other stuff for now. As an FYI, I generally have been trying to keep the code as close to the TS implementation as possible https://github.com/bluesky-social/atproto/blob/e956ac06be32cbfef06605cda6298b5fd621513a/packages/pds/src/api/com/atproto/sync/subscribeRepos.ts
For testing, you should be able to use a client like Postman to subscribe to your websocket endpoint and in another client do things like create a new account, update the handle, create a new post, etc. and have the messages come through. All of those endpoints exist today under the com.atproto namespaces.
background
see the spec on event streams and
subscribe
endpoints here. see therocket_ws
crate here see thesubscription
type in the atproto lexicon heregenerally, when a client connects to a
subscribe
endpoint (see here), they connect via websockets to listen to events. they're one way (server -> client), with a few optional parameters including a backfill window or a cursor, allowing the subscriber to catch up on missed messages.requirements
subscribe
(currently/xrpc/com.atproto.sync.subscribe_repos
and/xrpc/com.atproto.label.subscribe_labels
)