Detect if a topic has a new post

AI-generated summary

In a Support discussion tagged webhooks, jordan1909 seeks to detect new post submissions client-side to prevent support cases from going unanswered — specifically aiming to set or update a topic timer based on post activity. simon points to Discourse’s webhook system, which triggers on new topics or posts, and links to documentation: Setting up Webhooks. jordan1909 follows up asking if topic timers can be updated dynamically after creation. cpradio suggests using the update a topic timestamp API endpoint, which may fulfill the need to adjust timers programmatically. The conversation confirms that detecting new posts via webhooks is possible and that topic metadata — including timestamps — can be updated via API, enabling automated workflows for support case management.

I needed to determine if it was possible to:

  1. Detect when a new post is submitted via client side
    Reason: We do a lot of support here. We do not want “stale” cases to go unanswered or slip through the cracks.

    ==> If specific poster != x set topic timer on a specific topic based on this change and set it to a specific user

It a long shot and I have a feeling this functionality will require a full plugin however I wanted to determine if this was the case.

I guess I am more directly trying to find out if I can even detect a post submission and if I can update the timer via an api call to the topic. I can figure out the rest myself if I can confirm this is possible and where this is documented.

There are webhooks sent when a new topic or post is created. They could probably get you the information you need. See: Configure webhooks that trigger on Discourse events to integrate with external services.

That is excellent. Just what was needed for the submission. Last thing is there a way to update the time on a topic? I can see in the app docs how to create a topic with a timer but can this timer be updated dynamically?

There is also update a topic timestamp, which might be what you want.