שמות Webhook שאילתה/לא עקבי?

סיכום מבוסס בינה מלאכותית

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.

שלום, אני חדש כאן ורק בונה מערך בדיקות ומנסה לגרום לווב-הוקים של תגובות לעבוד בין התקנת דיסקרוס והתקנת וורדפרס לבדיקה.

כאשר אני עורך תגובת פוסט בדיסקרוס, זה גורם לווב-הוק להיכשל עם ‘האירוע של הווב-הוק אינו נתמך’, בתגובה לקריאת X-Discourse-Event: post_edited מדיסקרוס.

כשמסתכלים על קוד התוסף ב-sync-discourse-topic.php שורה 49, נראה שהוא מצפה ל-post_updated, ולא ל-post_edited.

לא בטוח אם משהו השתנה או אם זו בעיה במערכת הדיסקרוס שלי לבדיקה.

אם אני מוסיף post_edited (וגם post_destroyed) לקוד בשורה 49, הכל עובד כשורה. הווב-הוק מוגדר עבור post_created_event, post_edited_event, post_destroyed_event, post_recovered_event.

וורדפרס אחרונה (6.8.3), תוסף (2.5.9), דיסקרוס (v3.6.0.beta1+124).

תודה - כל עזרה מוערכת.

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?