Skip to content

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

Merged
WilliamBergamin merged 2 commits intoslackapi:mainfrom
seratch:trigger-id
Sep 6, 2024
Merged

Add interactivity_pointer as trigger_id alias to views.* APIs#1556
WilliamBergamin merged 2 commits intoslackapi:mainfrom
seratch:trigger-id

Conversation

@seratch
Copy link
Contributor

@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
self,
*,
trigger_id: str,
trigger_id: Optional[str] = None,
Copy link
Contributor 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

@codecov
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
@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