Pronouns labels on Bluesky

refactor main

Changed files
+6 -8
src
+6 -8
src/main.ts
··· 25 25 }, 60000); 26 26 }); 27 27 28 - ws.on("close", function close() { 28 + ws.on("close", () => { 29 29 clearInterval(intervalID); 30 30 }); 31 31 32 32 ws.on("message", async (data) => { 33 33 const event: EventStream = JSON.parse(data.toString()); 34 34 cursor = event.time_us; 35 - if (event.type.includes("com")) { 36 - if (event.commit?.record?.subject.uri.includes(DID)) { 37 - await label( 38 - event.did, 39 - event.commit.record.subject.uri.split("/").pop()!, 40 - ); 41 - } 35 + if ( 36 + event.type.includes("com") && 37 + event.commit?.record?.subject.uri.includes(DID) 38 + ) { 39 + await label(event.did, event.commit.record.subject.uri.split("/").pop()!); 42 40 } 43 41 }); 44 42 };