Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interactivity_pointer as trigger_id alias to views.* APIs #1556

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

seratch
Copy link
Member

@seratch seratch commented Sep 6, 2024

Summary

views.open and views.push APIs now accept both trigger_id and interactivity_pointer

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs (Documents)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • 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 run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@seratch seratch added enhancement M-T: A feature request for new functionality web-client Version: 3x labels Sep 6, 2024
@seratch seratch added this to the 3.31.1 milestone Sep 6, 2024
@@ -5163,15 +5163,16 @@ async def users_profile_set(
async def views_open(
self,
*,
trigger_id: str,
trigger_id: Optional[str] = None,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only way to accept both in Python is to make both optional..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add some logic that raises a TypeError if both fields are None but this may not be needed if the API error mentions a missing trigger_id or interactivity_pointer field

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.91%. Comparing base (0e8a686) to head (13bd61f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1556      +/-   ##
==========================================
+ Coverage   84.88%   84.91%   +0.02%     
==========================================
  Files         113      113              
  Lines       12546    12546              
==========================================
+ Hits        10650    10653       +3     
+ Misses       1896     1893       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@WilliamBergamin WilliamBergamin merged commit 3f94e48 into slackapi:main Sep 6, 2024
12 checks passed
@seratch seratch deleted the trigger-id branch September 8, 2024 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality Version: 3x web-client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants