René's URL Explorer Experiment


Title: Conditional Lazy Listener? · Issue #482 · slackapi/bolt-python · GitHub

Open Graph Title: Conditional Lazy Listener? · Issue #482 · slackapi/bolt-python

X Title: Conditional Lazy Listener? · Issue #482 · slackapi/bolt-python

Description: Is there a way to make it so that the lazy function triggers conditionally based on the ack response? For example, I want my ack to do parameter validation and potentially reject the request. Right now, my solution is to have the lazy fu...

Open Graph Description: Is there a way to make it so that the lazy function triggers conditionally based on the ack response? For example, I want my ack to do parameter validation and potentially reject the request. Right...

X Description: Is there a way to make it so that the lazy function triggers conditionally based on the ack response? For example, I want my ack to do parameter validation and potentially reject the request. Right...

Opengraph URL: https://github.com/slackapi/bolt-python/issues/482

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Conditional Lazy Listener?","articleBody":"Is there a way to make it so that the lazy function triggers conditionally based on the ack response?\r\n\r\nFor example, I want my ack to do parameter validation and potentially reject the request. Right now, my solution is to have the lazy function run the same parameter validation as the ack function, but it seems a bit wasteful. I'd much rather the lazy function not get triggered at all in the scenario where the ack function returns errors to the user.\r\n\r\n### Reproducible in:\r\n#### The `slack_bolt` version\r\n\r\n`slack-bolt==1.9.1`\r\n\r\n#### Python runtime version\r\n\r\n`Python 3.8.12`\r\n\r\n#### OS info\r\n\r\n```\r\nProductName:    macOS\r\nProductVersion: 11.5.2\r\nBuildVersion:   20G95\r\nDarwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64\r\n```\r\n\r\n#### Steps to reproduce:\r\n\r\nRun something like this:\r\n\r\n```python\r\ndef validate_the_stuff(ack, view):\r\n    #errors = validate_inputs(view)\r\n    errors = { \"environment-select-block\": \"Nope\" }\r\n    if len(errors) > 0:\r\n        ack(response_action=\"errors\", errors=errors)\r\n        return False\r\n    else:\r\n        ack(response_action=\"clear\")\r\n\r\ndef do_the_thing(view):\r\n    logging.error(\"You should not get this far\")\r\n\r\napp.view_submission('environment_select_submit')(\r\n    ack=validate_the_stuff,\r\n    lazy=[do_the_thing]\r\n)\r\n```\r\n\r\n### Expected result:\r\n\r\nDon't do the thing if validation fails.\r\n\r\n### Actual result:\r\n\r\nDoes the thing even if validation fails.\r\n\r\n## Requirements\r\n\r\nPlease read the [Contributing guidelines](https://github.com/slackapi/bolt-python/blob/main/.github/contributing.md) and [Code of Conduct](https://slackhq.github.io/code-of-conduct) before creating this issue or pull request. By submitting, you are agreeing to those rules.\r\n","author":{"url":"https://github.com/sigJoe","@type":"Person","name":"sigJoe"},"datePublished":"2021-10-01T15:41:45Z","url":"https://github.com/slackapi/bolt-python/issues/482"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c084ecbf-7e13-de07-2f47-31a877fda70b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9FA6:C7386:152B118:1D2DC0C:6AFEB8B9
html-safe-nonce0cc490752243e42f2ca50997a8a474657b5d8611193d965b876b661bb7e251ae
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkE2OkM3Mzg2OjE1MkIxMTg6MUQyREMwQzo2QUZFQjhCOSIsInZpc2l0b3JfaWQiOiI0NDc0MTM5NTc2NjAzOTQ5MjQyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacec331b67174116f06a573a72a07e83a7b63eafe5f0c9069accff9ed6329759cc
hovercard-subject-tagissue:1013494164
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/slackapi/bolt-python/482/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1abb9334e6c428493c72ab40a4fa206c0c720cc29b8f2e96e62b53407bee6668/slackapi/bolt-python/issues/482
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1abb9334e6c428493c72ab40a4fa206c0c720cc29b8f2e96e62b53407bee6668/slackapi/bolt-python/issues/482
og:image:altIs there a way to make it so that the lazy function triggers conditionally based on the ack response? For example, I want my ack to do parameter validation and potentially reject the request. Right...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesigJoe
hostnamegithub.com
expected-hostnamegithub.com
None95b2753c978240785d6cca00783c00a371b2d7d9879bb32e305170a1b19bd28e
turbo-cache-controlno-preview
go-importgithub.com/slackapi/bolt-python git https://github.com/slackapi/bolt-python.git
octolytics-dimension-user_id6962987
octolytics-dimension-user_loginslackapi
octolytics-dimension-repository_id268795735
octolytics-dimension-repository_nwoslackapi/bolt-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id268795735
octolytics-dimension-repository_network_root_nwoslackapi/bolt-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3f25273206cd841171bca0002261ae4c9757d934
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/slackapi/bolt-python/issues/482#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fslackapi%2Fbolt-python%2Fissues%2F482
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fslackapi%2Fbolt-python%2Fissues%2F482
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=slackapi%2Fbolt-python
Reloadhttps://github.com/slackapi/bolt-python/issues/482
Reloadhttps://github.com/slackapi/bolt-python/issues/482
Reloadhttps://github.com/slackapi/bolt-python/issues/482
slackapihttps://github.com/slackapi
bolt-pythonhttps://github.com/slackapi/bolt-python
Codehttps://github.com/slackapi/bolt-python
Issues28 (28)https://github.com/slackapi/bolt-python/issues
Pull requests11 (11)https://github.com/slackapi/bolt-python/pulls
Actionshttps://github.com/slackapi/bolt-python/actions
Security and qualityhttps://github.com/slackapi/bolt-python/security
Insightshttps://github.com/slackapi/bolt-python/insights
https://github.com/slackapi/bolt-python
New issuehttps://github.com/login?return_to=https://github.com/slackapi/bolt-python/issues/482
New issuehttps://github.com/login?return_to=https://github.com/slackapi/bolt-python/issues/482
Conditional Lazy Listener?https://github.com/slackapi/bolt-python/issues/482#top
https://github.com/seratch
area:asynchttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22area%3Aasync%22
area:synchttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22area%3Async%22
discussionhttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22discussion%22
enhancementNew feature or requesthttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
1.xhttps://github.com/slackapi/bolt-python/milestone/39
https://github.com/sigJoe
sigJoehttps://github.com/sigJoe
on Oct 1, 2021https://github.com/slackapi/bolt-python/issues/482#issue-1013494164
Contributing guidelineshttps://github.com/slackapi/bolt-python/blob/main/.github/contributing.md
Code of Conducthttps://slackhq.github.io/code-of-conduct
seratchhttps://github.com/seratch
area:asynchttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22area%3Aasync%22
area:synchttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22area%3Async%22
discussionhttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22discussion%22
enhancementNew feature or requesthttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
on Oct 4, 2021https://github.com/slackapi/bolt-python/issues/482#event-5400689080
seratchhttps://github.com/seratch
1.xhttps://github.com/slackapi/bolt-python/milestone/39
on Oct 4, 2021https://github.com/slackapi/bolt-python/issues/482#event-5400689181
seratchhttps://github.com/seratch
on Oct 4, 2021https://github.com/slackapi/bolt-python/issues/482#event-5400689311
https://github.com/seratch
seratchhttps://github.com/seratch
on Oct 4, 2021https://github.com/slackapi/bolt-python/issues/482#issuecomment-933067975
https://github.com/sigJoe
sigJoehttps://github.com/sigJoe
on Oct 4, 2021https://github.com/slackapi/bolt-python/issues/482#issuecomment-933649820
@seratchhttps://github.com/seratch
Sign up for freehttps://github.com/signup?return_to=https://github.com/slackapi/bolt-python/issues/482
Sign in to commenthttps://github.com/login?return_to=https://github.com/slackapi/bolt-python/issues/482
seratchhttps://github.com/seratch
area:asynchttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22area%3Aasync%22
area:synchttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22area%3Async%22
discussionhttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22discussion%22
enhancementNew feature or requesthttps://github.com/slackapi/bolt-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
1.xNo due datehttps://github.com/slackapi/bolt-python/milestone/39
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.