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

Fix RichTextElementParts.Date.timestamp to be an int #1560

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

PaarthShah
Copy link
Contributor

@PaarthShah PaarthShah commented Sep 9, 2024

Summary

Fix the type.

If passing an actual str:

slack_sdk.errors.SlackApiError: The request to the Slack API failed. (url: https://slack.com/api/chat.postMessage, status: 200)
The server responded with: {'ok': False, 'error': 'invalid_blocks', 'errors': ['must provide an integer [json-pointer:/blocks/1/elements/0/elements/1/timestamp]'], 'response_metadata': {'messages': ['[ERROR] must provide an integer [json-pointer:/blocks/1/elements/0/elements/1/timestamp]']}}

Testing

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.

Copy link

salesforce-cla bot commented Sep 9, 2024

Thanks for the contribution! Before we can merge this, we need @PaarthShah to sign the Salesforce Inc. Contributor License Agreement.

@PaarthShah PaarthShah marked this pull request as ready for review September 9, 2024 20:54
@PaarthShah
Copy link
Contributor Author

image

@seratch seratch closed this Sep 9, 2024
@seratch seratch reopened this Sep 9, 2024
@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented web-client Version: 3x labels Sep 9, 2024
@seratch seratch added this to the 3.32.1 milestone Sep 9, 2024
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.89%. Comparing base (8547826) to head (b623aa3).
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1560   +/-   ##
=======================================
  Coverage   84.88%   84.89%           
=======================================
  Files         113      113           
  Lines       12546    12546           
=======================================
+ Hits        10650    10651    +1     
+ Misses       1896     1895    -1     

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

Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

Thank you!

@seratch seratch merged commit 44b60c5 into slackapi:main Sep 10, 2024
12 checks passed
@PaarthShah PaarthShah deleted the date-timestamp-type branch September 10, 2024 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented cla:signed Version: 3x web-client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants