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 endpoint to socketmode Clinet and OptionAPIURL function #1198

Closed

Conversation

ToshihitoKon
Copy link
Contributor

@ToshihitoKon ToshihitoKon commented May 6, 2023

Pull Request Guidelines

These are recommendations for pull requests.
They are strictly guidelines to help manage expectations.

PR preparation

Run make pr-prep from the root of the repository to run formatting, linting and tests.

Should this be an issue instead
  • is it a convenience method? (no new functionality, streamlines some use case)
  • exposes a previously private type, const, method, etc.
  • is it application specific (caching, retry logic, rate limiting, etc)
  • is it performance related.
API changes

Since API changes have to be maintained they undergo a more detailed review and are more likely to require changes.

  • no tests, if you're adding to the API include at least a single test of the happy case.
  • If you can accomplish your goal without changing the API, then do so.
  • dependency changes. updates are okay. adding/removing need justification.
Examples of API changes that do not meet guidelines:
  • in library cache for users. caches are use case specific.
  • Convenience methods for Sending Messages, update, post, ephemeral, etc. consider opening an issue instead.

Change points

  • Added an endpoint member to SocketMode Client
  • Added an socketmode.OptionAPIURL function

Motivation

I'm creating an application that acts as a server for a Slack App.
To do that, we need to point the Endpoint accessed from slack-go/slack away from https://api.slack.com.

The slack client provided a way to change the Endpoint URL, while the socketmode client did not. I also found the URL hardcoded in the openAndDial function.
This PR prepares the same OptionAPIURL for socketmode client as for slack client.

I would like opinions on whether this change should go into slack-go/slack.

@ToshihitoKon
Copy link
Contributor Author

This change was unnecessary.

I figured out that the websocket URL is taken from the result of the apps.connections.open API request and the endpoint of the websocket module is irrelevant.

@ToshihitoKon ToshihitoKon deleted the socketmode-apiurl-option branch May 6, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant