Skip to content

Method Argument Alignment: chat.postMessage, chat.update #1495

Closed

Description

@AlexAtkinson

The method chat.update requirs a channel id rather than a channel name, making it difficult to use. Please align its arguments with those of chat.postMessage, and allowing it to accept a channel name.

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

  • [ X] 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)

Activity

  1. seratch commented on May 10, 2024

    @seratch
    Contributor

    Hello @AlexAtkinson, thank you for reaching out!

    I understand that passing a channel name rather than its ID would be more convenient in many scenarios. However, our platform does not currently support channel name param for newer APIs (including chat.update). The channel name param is only available in the most long-lived APIs such as chat.postMessage and files.upload.

    The reason behind this design policy change for newer APIs is inherent fragility of API calls due to the possibility of renaming at any time. This potential randomness often results in unexpected errors during API calls. While it might not make sense to you, our platform made this direction change to reduce such errors moving forward. For this reason, I am sorry to say this, but our platform team will not be incorporating any updates that allow APIs to accept channel names further.

    I understand that this may not be the answer you were hoping for, but we greatly appreciate your understanding. Thank you so much again for taking the time to share this feedback.

  2. AlexAtkinson commented on May 10, 2024

    @AlexAtkinson
    Author

    Thanks for the info. A blurb on in the docs would short circuit other like issues.

    I would rather not be able to rename channels than loose channel name direct referencing, though. I think I've renamed a channel once.

    Best,
    A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions