diff --git a/packages/atproto/classifiers/tech/tech-links.ts b/packages/atproto/classifiers/tech/tech-links.ts index 5a064f8..136d9d9 100644 --- a/packages/atproto/classifiers/tech/tech-links.ts +++ b/packages/atproto/classifiers/tech/tech-links.ts @@ -20,5 +20,5 @@ const notInterested = { } as const; const techLinkMatcher = new RegExp( - /^https:\/\/(www\.)?(github\.com|developer\.mozilla.org|stackoverflow\.com|serverfault\.com|superuser\.com)/i + /^https:\/\/(www\.)?(github\.com|developer\.mozilla.org|stackoverflow\.com|serverfault\.com|superuser\.com|codepen.io|stackblitz.com)/i ); diff --git a/packages/jetstream/jetstream.ts b/packages/jetstream/jetstream.ts index ea2fa00..57f719c 100644 --- a/packages/jetstream/jetstream.ts +++ b/packages/jetstream/jetstream.ts @@ -136,7 +136,7 @@ export class Jetstream { //console.log(`[jetstream] ${socketId.slice(-6)}: msg`, msg); if (msg.kind !== "commit") return; // only kind supported atm - //if (msg.commit.operation !== "create") return; + if (msg.commit.operation !== "create") return; // TODO: Broke these types being smart - fix tomorrow @@ -146,6 +146,10 @@ export class Jetstream { for (const listener of this.listeners.filter( (l) => l.event === "post" )) { + if (!msg.commit.record) { + console.warn("Received a post event without record"); + continue; + } await listener.cb(toFeedPostWithUri(msg as CommitEvent)); } break;