Webhook for notifications - how to clear them?

I have a webhook set up so when a user gets a notification on the Discourse, I can put an “unread” marker on my connected WordPress site. So far, so good.

But if the user then visits the Discourse and reads the notification, I’m stumped now for a way to remove the “unread” marker on the site?

There isn’t any kind of webhook for “user clears notifications”? Or am I missing something?

I know I could do this with API calls but trying to avoid constant API calls for every page load on my site.

Thanks!

1 Like

There doesn’t seem to be one. Instead of making an API call to Discourse, I’d be tempted to clear the “unread” notification on WordPress when a user clicks the notification marker on your WordPress site.

Thanks. I’ve been looking at this since I posted it and instead just went with polling the API to get notifications, it’s simpler :man_shrugging:t2:

2 Likes