[READ-ONLY] Mirror of https://github.com/flo-bit/bluesky-visualizers. visualizing bluesky live data in different ways flo-bit.dev/bluesky-visualizers/
bluesky svelte visualizations
0

Configure Feed

Select the types of activity you want to include in your feed.

fix: :bug: Fixed new users not showing

Joery (Nov 19, 2024, 3:35 PM +0800) 13fa3810 80cf4159

+20 -18
+20 -18
src/routes/particles/+page.svelte
··· 139 139 }); 140 140 141 141 const url = 142 - 'wss://jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post&wantedCollections=app.bsky.feed.like&wantedCollections=app.bsky.graph.follow'; 142 + 'wss://jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post&wantedCollections=app.bsky.feed.like&wantedCollections=app.bsky.graph.follow&wantedCollections=app.bsky.actor.profile'; 143 143 144 144 // WebSocket logic 145 145 const ws = new WebSocket(url); ··· 149 149 150 150 ws.onmessage = (event) => { 151 151 const json = JSON.parse(event.data); 152 - if (json.kind === 'account') console.log(json); 153 152 154 - if (json.kind === 'commit') { 155 - if (json.commit.collection === 'app.bsky.feed.post' && json.commit.operation === 'create') { 156 - spawnParticle('post'); 157 - } else if ( 158 - json.commit.collection === 'app.bsky.feed.like' && 159 - json.commit.operation === 'create' 160 - ) { 161 - spawnParticle('heart'); 162 - } else if ( 163 - json.commit.collection === 'app.bsky.graph.follow' && 164 - json.commit.operation === 'create' 165 - ) { 166 - spawnParticle('follow'); 167 - } 168 - } else if (json.kind === 'account' && json.account.active) { 169 - spawnParticle('user'); 153 + if (json.kind !== 'commit') return; 154 + 155 + if (json.commit.collection === 'app.bsky.feed.post' && json.commit.operation === 'create') { 156 + spawnParticle('post'); 157 + } else if ( 158 + json.commit.collection === 'app.bsky.feed.like' && 159 + json.commit.operation === 'create' 160 + ) { 161 + spawnParticle('heart'); 162 + } else if ( 163 + json.commit.collection === 'app.bsky.graph.follow' && 164 + json.commit.operation === 'create' 165 + ) { 166 + spawnParticle('follow'); 167 + } else if ( 168 + json.commit.collection === 'app.bsky.actor.profile' && 169 + json.commit.operation === 'create' 170 + ) { 171 + spawnParticle('user') 170 172 } 171 173 }; 172 174