atproto explorer
0
fork

Configure Feed

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

fix commits, add identity events

Juliet bdcb2639 2a873236

+17 -4
+17 -4
src/views/subscribeRepos.tsx
··· 39 39 relay: url, 40 40 cursor: cursor, 41 41 }); 42 - firehose.on("error", (commit) => { 43 - console.log(commit); 42 + firehose.on("error", (err) => { 43 + console.error(err); 44 44 }); 45 45 firehose.on("commit", (commit) => { 46 46 for (const op of commit.ops) { 47 - setRecords(records().concat(op).slice(-LIMIT)); 47 + const record = { 48 + $type: commit.$type, 49 + repo: commit.repo, 50 + seq: commit.seq, 51 + time: commit.time, 52 + rev: commit.rev, 53 + since: commit.since, 54 + tooBig: commit.tooBig, 55 + op: op, 56 + }; 57 + setRecords(records().concat(record).slice(-LIMIT)); 48 58 } 59 + }); 60 + firehose.on("identity", (identity) => { 61 + setRecords(records().concat(identity).slice(-LIMIT)); 49 62 }); 50 63 firehose.start(); 51 64 }); ··· 119 132 <For each={records().toReversed()}> 120 133 {(rec) => ( 121 134 <div class="pt-2"> 122 - <JSONValue data={rec} repo={rec.did} /> 135 + <JSONValue data={rec} repo={rec.did ?? rec.repo} /> 123 136 </div> 124 137 )} 125 138 </For>