Skip to content

Commit

Permalink
Merge pull request #418 from seratch/pr-417
Browse files Browse the repository at this point in the history
[v2] Bring PR #417 changes to v2 branch
  • Loading branch information
stevengill authored Mar 5, 2020
2 parents 1428ec3 + 8aa5727 commit 711d3bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/_basic/ja_opening_modals.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ order: 9

```javascript
// コマンド起動をリッスン
app.command('/ticket', async ({ ack, payload, context }) => {
app.command('/ticket', async ({ ack, body, context }) => {
// コマンドのリクエストを確認
await ack();

try {
const result = await app.client.views.open({
token: context.botToken,
// 適切な trigger_id を受け取ってから 3 秒以内に渡す
trigger_id: payload.trigger_id,
trigger_id: body.trigger_id,
// view の値をペイロードに含む
view: {
type: 'modal',
Expand Down
4 changes: 2 additions & 2 deletions docs/_basic/opening_modals.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Read more about modal composition in the <a href="https://api.slack.com/surfaces

```javascript
// Listen for a slash command invocation
app.command('/ticket', async ({ ack, payload, context }) => {
app.command('/ticket', async ({ ack, body, context }) => {
// Acknowledge the command request
await ack();

try {
const result = await app.client.views.open({
token: context.botToken,
// Pass a valid trigger_id within 3 seconds of receiving it
trigger_id: payload.trigger_id,
trigger_id: body.trigger_id,
// View payload
view: {
type: 'modal',
Expand Down

0 comments on commit 711d3bd

Please sign in to comment.