Webhook namen query/inconsistent?

AI-generated summary

In a WordPress-related discussion titled ‘Webhook names query/inconsistent?’, TimMOz reports an issue where Discourse’s ‘post_edited’ webhook event fails with ‘The webhook event is not supported’. Reviewing the plugin code in sync-discourse-topic.php, they note that the supported events array (line 49) doesn’t include ‘post_edited’ or ‘post_recovered’. TimMOz resolves the issue by manually adding ‘post_edited’, ‘post_updated’, ‘post_recovered’, and ‘post_restored’ to the supported events array. angus thanks Tim for the fix and apologizes for the delayed response, noting they’ll update the plugin’s webhook event names in the next version. tobiaseigen initially notes the topic had no replies and tobiaseigen later asks if the issue is now resolved. The core problem was a mismatch between Discourse’s webhook events and the plugin’s supported events list.

Hallo, ik ben hier nieuw in en ben bezig met het opzetten van een testomgeving en probeer webhooks voor reacties werkend te krijgen tussen een test-Discourse- en een test-WordPress-installatie.

Wanneer ik een berichtreactie bewerk in Discourse, mislukt de webhook met de melding ‘The webhook event is not supported’, als reactie op een X-Discourse-Event: post_edited aanroep van Discourse.

Als ik naar de plugin-code kijk in sync-discourse-topic.php regel 49, lijkt het erop dat deze post_updated verwacht, niet post_edited.

Ik weet niet zeker of er iets is veranderd of dat het iets in mijn test-Discourse-systeem is.

Als ik post_edited (en post_destroyed) toevoeg aan de code op regel 49, werkt alles prima. De webhook is geconfigureerd voor post_created_event, post_edited_event, post_destroyed_event, post_recovered_event.

Laatste WordPress (6.8.3), plugin (2.5.9), Discourse (v3.6.0.beta1+124).

Bedankt - elke hulp wordt gewaardeerd.

Looks like your topic didn’t find any takers! Sorry about that. Were you able to figure out a solution on your own? If so, can you share it here?

Hi, thanks for that … I have resolved (or worked around) by adding some supported events to the code around line 49 of sync-discourse-topic.php …

    $this->supported_events = array(
        'post_created',
        'post_updated',
        'post_edited',
        'post_destroyed',
        'post_recovered',
    );

Looks like as this just triggers it to re-read, that was all that was needed.

Thanks for this Tim, and apologies for not responding sooner. I missed your topic somehow! We’re going to make an update to the webhook names in the next version of the plugin.

Is this issue resolved now?