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

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

כאשר אני עורך תגובת פוסט בדיסקרוס, זה גורם לווב-הוק להיכשל עם ‘האירוע של הווב-הוק אינו נתמך’, בתגובה לקריאת 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.

2 לייקים

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.

2 לייקים

Is this issue resolved now?