diff --git a/app/api/discourse-new-topic/route.ts b/app/api/discourse-new-topic/route.ts index 5f6f82620..378bd5664 100644 --- a/app/api/discourse-new-topic/route.ts +++ b/app/api/discourse-new-topic/route.ts @@ -31,6 +31,13 @@ export async function POST(request: NextRequest): Promise { }); } + if (newTopicInfo.topic.archetype !== "regular") { + return new Response( + "We only care about regular topics, but thanks, try next time.", + { status: 200 }, + ); + } + console.log( `New topic was created, #${newTopicInfo.topic.id}, will fetch it after a brief pause.`, ); diff --git a/src/discourse.ts b/src/discourse.ts index db217d146..244eaa783 100644 --- a/src/discourse.ts +++ b/src/discourse.ts @@ -72,6 +72,7 @@ export const decodeNewTopicCallback = record({ tags: array(string), title: string, created_by: decodeUser, + archetype: string, }), });