大家好!
我一直在设置 Discourse 实例,并尝试配置直接发送到 Discord 服务器的 Webhook。但我在 Discord 中推送任何内容都没有成功。我在其他软件中有使用 Webhook 的经验,而且相当直接——但 Discourse 似乎不是这样。
Ping 测试总是返回 400 错误请求——请看信息:
Headers:
ate: Wed, 01 Nov 2023 11:57:42 GMT
content-type: application/json
content-length: 58
connection: close
set-cookie: __dcfduid=dcf0233a78ad11eebb88d697d01a97e7; Expires=Mon, 30-Oct-2028 11:57:42 GMT; Max-Age=157680000; Secure; HttpOnly; Path=/, __sdcfduid=dcf0233a78ad11eebb88d697d01a97e78400f2bac802b92ae5cd11d0fb83f18916f0fdca5d48d309bd75aaaaba4d1431; Expires=Mon, 30-Oct-2028 11:57:42 GMT; Max-Age=157680000; Secure; HttpOnly; Path=/, __cf_bm=ACfLMGcKwXZiIw0euAAqKlZ1iroL0N.lG_2clanSP5M-1698839862-0-AUp8RGopNouFfnPVX/qbsLKr+5d1F9HQJ7zS9cGBeg6YH0urIlNg62SSP2cSSZFeZB9mC4TFRf323pdEHk5bTyY=; path=/; expires=Wed, 01-Nov-23 12:27:42 GMT; domain=.discordapp.com; HttpOnly; Secure; SameSite=None, __cfruid=7777c6c50b4e0b129fbc66ba8f4f6ab654a756c5-1698839862; path=/; domain=.discordapp.com; HttpOnly; Secure; SameSite=None, _cfuvid=mgEBXzSq5xWc_05ETnRJURj3e3yjIaRGrJQ0DeJyYA0-1698839862706-0-604800000; path=/; domain=.discordapp.com; HttpOnly; Secure; SameSite=None
strict-transport-security: max-age=31536000; includeSubDomains
x-ratelimit-bucket: 3d2712a9e4fe17cc9d3fed4a8e672e5f
x-ratelimit-limit: 5
x-ratelimit-remaining: 3
x-ratelimit-reset: 1698839864
x-ratelimit-reset-after: 1
via: 1.1 google
alt-svc: h3=":443"; ma=86400
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=WbIOWcprUjt2ga6UbHxwUh34HscqFqtWix5A9U%2FBKHOhRSCnydePJMngumK%2BgyupooTEjMuLVC%2FLhieBLLbD%2BQhTDdfNb4v%2BH2kO7ah8BdYbNNAU27fFaeErzlQYifFG"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 81f3f634dcf470fa-HEL
And return content:
{"message": "Cannot send an empty message", "code": 50006}
有人知道该检查什么吗?我们需要聊天插件才能使其工作吗(我们尝试过但无效)?似乎我们遗漏了一些显而易见的东西。另外,我尝试启用 Webhook 中的所有内容,即使负载不是空的——我仍然收到相同的返回内容。
{
"category": {
"id": 2,
"name": "Feedback",
"color": "0E76BD",
"text_color": "FFFFFF",
"slug": "feedback",
"topic_count": 1,
"post_count": 0,
"position": 1,
"description": "Feedback over ons forum <strong>forum.dtvwp.nl</strong>, onze website <strong>dtvwp.nl</strong> of over <strong>onze Facebook groepen</strong> mag hier geplaatst worden. We houden van constructieve feedback, dus feedback en suggesties zijn altijd welkom en erg gewaardeerd!",
"description_text": "Feedback over ons forum forum.dtvwp.nl, onze website dtvwp.nl of over onze Facebook groepen mag hier geplaatst worden. We houden van constructieve feedback, dus feedback en suggesties zijn altijd welkom en erg gewaardeerd!",
"description_excerpt": "Feedback over ons forum forum.dtvwp.nl, onze website dtvwp.nl of over onze Facebook groepen mag hier geplaatst worden. We houden van constructieve feedback, dus feedback en suggesties zijn altijd welkom en erg gewaardeerd!",
"topic_url": "/t/over-het-forum-feedback/1",
"read_restricted": false,
"permission": null,
"topic_template": null,
"has_children": null,
"sort_order": null,
"sort_ascending": null,
"show_subcategory_list": false,
"num_featured_topics": 3,
"default_view": null,
"subcategory_list_style": "rows_with_featured_topics",
"default_top_period": "all",
"default_list_filter": "all",
"minimum_required_tags": 0,
"navigate_to_first_post_after_read": false,
"custom_fields": {},
"allowed_tags": [],
"allowed_tag_groups": [],
"allow_global_tags": false,
"read_only_banner": null,
"form_template_ids": [],
"auto_close_hours": null,
"auto_close_based_on_last_post": false,
"group_permissions": [
{
"permission_type": 1,
"group_name": "iedereen"
}
],
"email_in": null,
"email_in_allow_strangers": false,
"mailinglist_mirror": false,
"all_topics_wiki": false,
"allow_unlimited_owner_edits_on_first_post": false,
"cannot_delete_reason": "Deze categorie kan niet worden verwijderd, omdat het aantal topics 1 is.",
"is_special": true,
"allow_badges": true,
"topic_featured_link_allowed": true,
"search_priority": 0,
"default_slow_mode_seconds": null,
"uploaded_logo": null,
"uploaded_logo_dark": null,
"uploaded_background": null,
"required_tag_groups": [],
"category_setting": {
"auto_bump_cooldown_days": 1,
"num_auto_bump_daily": 0,
"require_reply_approval": false,
"require_topic_approval": false
}
}
}
目前,我们唯一希望看到的钩子/通知是当新用户确认其电子邮件并等待版主/管理员确认时——我们在 Discord 频道中收到一个 ping。