خطاف الويب بعد الحدث لا يشير إلى حذف المنشور

I have a webhook handling post events, but if I delete a post, there is nothing that indicates deletion. I expected one of these fields to tell me it was deleted:

post {
           u'deleted_at': None,
           u'hidden': False,
           u'user_deleted': False,
           ...
}
إعجاب واحد (1)

@justin هل يمكنك إعادة إنتاج المشكلة؟

إعجاب واحد (1)

نعم، أستطيع ذلك.

لقد قمت للتو بحذف منشور في فئة مقفلة على موقع لي. تم إنشاء ويب هوك، لكنه لا يشير إلى أن المنشور قد تم حذفه في الحمولة، بل فقط في الرأس.

الرؤوس:

Request URL: xxxxxxx
Request method: POST
Accept: */*
Connection: close
Content-Length: 880
Content-Type: application/json
Host: hooks.zapier.com
User-Agent: Discourse/2.4.0.beta1
X-Discourse-Instance: xxxxxxx
X-Discourse-Event-Id: 6334
X-Discourse-Event-Type: post
X-Discourse-Event: post_destroyed

الحمولة:

{
  "post": {
    "id": 11702,
    "name": "Justin DiRose",
    "username": "justindirose",
    "avatar_template": "/user_avatar/xxxxxxxx/justindirose/{size}/1795_2.png",
    "created_at": "2019-06-28T18:50:55.078Z",
    "cooked": "<p>منشور جديد هنا. فقط للاختبار.</p>",
    "post_number": 2,
    "post_type": 1,
    "updated_at": "2019-06-28T18:50:55.078Z",
    "reply_count": 0,
    "reply_to_post_number": null,
    "quote_count": 0,
    "incoming_link_count": 0,
    "reads": 1,
    "score": 0,
    "topic_id": 5184,
    "topic_slug": "test-webhook-topic",
    "topic_title": "Test Webhook Topic",
    "display_username": "Justin DiRose",
    "primary_group_name": "",
    "version": 1,
    "user_title": "",
    "moderator": true,
    "admin": true,
    "staff": true,
    "user_id": xxx,
    "hidden": false,
    "trust_level": 4,
    "deleted_at": null,
    "user_deleted": false,
    "edit_reason": null,
    "wiki": false,
    "reviewable_id": null,
    "reviewable_score_count": 0,
    "reviewable_score_pending_count": 0,
    "topic_posts_count": 2
  }
}
6 إعجابات

أعتقد أن هذا يعمل كما هو مصمم، حيث يرسل الويب هوك لقطة للكائن مباشرة قبل حدوث الحدث، لأن الإجراء قد يكون مدمرًا، ويرسل سبب الويب هوك في الرأس.

5 إعجابات