question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Action doesn't send payload if deep link in url prop

See original GitHub issue

Description

Hi, the button doc says If you're using url, you'll still receive an interaction payload it is actually the case except if the value of url is a Slack deep link, so :

{
	"type": "button",
	"text": {
		"type": "plain_text",
		text
	},
	action_id
	url:  `https://mysite.com`
}

sends a payload, but

{
	"type": "button",
	"text": {
		"type": "plain_text",
		text
	},
	action_id
	url:  `slack://app?team=${team_id}&id=${app_id}&tab=message`
}

does not. Is this a bug or a documented behavior or am I missing something to make it work? I am 99% sure it was actually sending a payload last week.

edit: Just upgraded to Bolt 2.0 (congrats for the release 🎉) but the result is the same. I guess it has to do with Slack API?

Thanks for your help.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
  • I’ve read and agree to the Code of Conduct.
  • I’ve searched for any related issues and avoided creating a duplicate issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
seratchcommented, Apr 6, 2020

@gterras Thanks for reporting this. I’ve confirmed a link button with a Slack deep link doesn’t send a block_actions event to Slack app’s request URL. I will share this feedback with the team concerned.

app.command("/show-buttons", async ({ ack, body }) => {
  const apiAppId = "A12345678";
  const text = {
    "type": "mrkdwn",
    "text": "click the button"
  };
  await ack({
    blocks: [
      {
        "type": "section",
        "text": text,
        "accessory": {
          "type": "button",
          "action_id": "deep-link-test",
          "text": {
            "type": "plain_text",
            "text": "deep link"
          },
          "url": `slack://app?team=${body.team_id}&id=${apiAppId}&tab=message`
        }
      },
      {
        "type": "section",
        "text": text,
        "accessory": {
          "type": "button",
          "action_id": "link-test",
          "text": {
            "type": "plain_text",
            "text": "link"
          },
          "url": "https://slack.com"
        }
      },
      {
        "type": "section",
        "text": text,
        "accessory": {
          "type": "button",
          "action_id": "button-test",
          "text": {
            "type": "plain_text",
            "text": "button"
          },
          "value": "click_me_123",
        }
      }
    ]
  })
});

app.action('deep-link-test', ({ logger, ack }) => {
  logger.info("Deep link clicked!");
  ack()
});
app.action('link-test', ({ logger, ack }) => {
  logger.info("Link clicked!");
  ack()
});
app.action('button-test', ({ logger, ack }) => {
  logger.info("Button clicked!");
  ack()
});
/*
⚡️ Bolt app is running!
[INFO]  bolt-app Link clicked!
[INFO]  bolt-app Button clicked!
*/
0reactions
gterrascommented, Apr 10, 2020

FYI I got confirmation from Slack support that this issue was fixed for all OS.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native deep linking is not working on real device
I am using gmail and gmail supports deep linking. When I change the link to an http address it works properly. It looks...
Read more >
URLs, Links and Deep Links - OneSignal Documentation
This section discusses how to prevent the Launch URL from opening a browser. If you want to keep this functionality, then see below...
Read more >
Create a deep link for a destination - Android Developers
In the Design tab of the Navigation Editor, select the destination for the deep link. · Click + in the Deep Links section...
Read more >
Understanding deep linking in React Native - LogRocket Blog
A comprehensive guide to deep linking in React Native for iOS 14+ and Android 11.x, including a step-by-step tutorial.
Read more >
Deep linking - React Navigation
If the app was already open, the deep link needs to update the state to reflect the incoming link. React Native provides a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found