Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf9087d6

Browse files
fix: correct Slack webhook example code in documentation (#21295)
Fixes#21294
1 parente4f87d5 commitf9087d6

File tree

1 file changed

+5
-5
lines changed
  • docs/admin/monitoring/notifications

1 file changed

+5
-5
lines changed

‎docs/admin/monitoring/notifications/slack.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ To build the server to receive webhooks and interact with Slack:
8989
returnres.status(400).send("Error: request body is missing");
9090
}
9191

92-
const {title_markdown,body_markdown }=req.body;
93-
if (!title_markdown||!body_markdown) {
92+
const {title,body_markdown }=req.body;
93+
if (!title||!body_markdown) {
9494
return res
9595
.status(400)
96-
.send('Error: missing fields: "title_markdown", or "body_markdown"');
96+
.send('Error: missing fields: "title", or "body_markdown"');
9797
}
9898

9999
constpayload=req.body.payload;
@@ -115,11 +115,11 @@ To build the server to receive webhooks and interact with Slack:
115115

116116
constslackMessage= {
117117
channel:userByEmail.user.id,
118-
text:body,
118+
text:body_markdown,
119119
blocks: [
120120
{
121121
type:"header",
122-
text: { type:"mrkdwn", text:title_markdown },
122+
text: { type:"plain_text", text:title },
123123
},
124124
{
125125
type:"section",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp