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

Support all possible fields for RichTextElementParts.Date #1533

Closed
1 of 9 tasks
deppe opened this issue Jul 22, 2024 · 1 comment · Fixed by #1536
Closed
1 of 9 tasks

Support all possible fields for RichTextElementParts.Date #1533

deppe opened this issue Jul 22, 2024 · 1 comment · Fixed by #1536
Assignees
Labels
enhancement M-T: A feature request for new functionality good first issue Version: 3x web-client
Milestone

Comments

@deppe
Copy link

deppe commented Jul 22, 2024

The slack_sdk.models.blocks.RichTextElementsParts.Date type supports timestamp, but the actual "date" rich text element supports other fields like url, fallback, format. Can this be extended to properly support all available fields?

documentation: https://api.slack.com/reference/block-kit/blocks#rich_text:~:text=date-,The%20following%20are%20the%20properties%20of%20the,object%20type,-in%20the

block builder example: https://app.slack.com/block-kit-builder/TG4KUE8JV#%7B%22blocks%22:%5B%7B%22type%22:%22rich_text%22,%22elements%22:%5B%7B%22type%22:%22rich_text_section%22,%22elements%22:%5B%7B%22type%22:%22date%22,%22timestamp%22:1720710212,%22format%22:%22%7Bdate_num%7D%20at%20%7Btime%7D%22,%22fallback%22:%22timey%22%7D%5D%7D%5D%7D%5D%7D

vs actual type in slack_sdk library:
https://github.com/slackapi/python-slack-sdk/blob/main/slack_sdk/models/blocks/block_elements.py#L2097-L2112

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

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.models (UI component builders)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.rtm (RTM client)
  • slack_sdk.signature (Request Signature Verifier)

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

@seratch seratch added enhancement M-T: A feature request for new functionality web-client Version: 3x good first issue and removed untriaged labels Jul 22, 2024
@seratch seratch added this to the 3.31.1 milestone Jul 22, 2024
@seratch
Copy link
Member

seratch commented Jul 22, 2024

Hi @deppe, thanks for taking the time to report this. You're right that rich text block elements were recently enhanced for third-party apps. Consequently, the model classes in this SDK do not yet support all the newly added properties. Our Java SDK recently resolved the same issue, so the Python SDK can follow suit: slackapi/java-slack-sdk@d226674

We will resolve this in future releases. If you're interested in contributing to this SDK, your pull requests would be greatly appreciated.

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 good first issue Version: 3x web-client
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants