···4444# this gives you a parsed message object, one of subclasses of Skyfall::Firehose::Message
4545sky.on_message { |msg| p msg }
46464747-# this gives you raw data as received from the websocket
4747+# this gives you raw binary data as received from the websocket
4848sky.on_raw_message { |data| p data }
49495050# lifecycle events
···159159Account messages additionally have:
160160161161- `active?` - whether the account is active, or inactive for any reason
162162-- `status` - if not active, shows the status of the account (`"deactivated"`, `"deleted"`, `"takendown"`)
162162+- `status` - if not active, shows the status of the account (`:deactivated`, `:deleted`, `:takendown`)
163163164164Info messages additionally have:
165165···278278279279### Jetstream filters
280280281281-Jetstream allows you to specify [filters](https://github.com/bluesky-social/jetstream?tab=readme-ov-file#consuming-jetstream) of collection types and/or tracked DIDs when you connect, so it will send you only the events you're interested in. You can e.g. only ask for posts and ignore likes, or only profile events and ignore everything else, or only listen for posts from a few specific accounts.
281281+Jetstream allows you to specify [filters](https://github.com/bluesky-social/jetstream?tab=readme-ov-file#consuming-jetstream) of collection types and/or tracked DIDs when you connect, so it will send you only the events you're interested in. You can e.g. ask only for posts and ignore likes, or only profile events and ignore everything else, or only listen for posts from a few specific accounts.
282282283283To use these filters, pass the "wantedCollections" and/or "wantedDids" parameters in the options hash when initializing `Skyfall::Jetstream`. You can use the original JavaScript param names, or a more Ruby-like snake_case form:
284284···292292For collections, you can also use the symbol codes used in `Operation#type`, e.g. `:bsky_post`:
293293294294```rb
295295-sky = Skyfall::Jetstream.new('jetstream1.us-east.bsky.network', { wanted_collections: [:bsky_post] })
295295+sky = Skyfall::Jetstream.new('jetstream1.us-east.bsky.network', {
296296+ wanted_collections: [:bsky_post]
297297+})
296298```
297299298300See [Jetstream docs](https://github.com/bluesky-social/jetstream?tab=readme-ov-file#consuming-jetstream) for more info on available filters.