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: slack-notify cli #51

Merged
merged 10 commits into from
Jan 25, 2024
Merged

Conversation

pm5
Copy link
Contributor

@pm5 pm5 commented Jun 6, 2023

  • This partially addresses Outdated API? #43
  • channels.list seems to become conversations.list now.
  • Responses of conversations.list are limited conversation objects that do not have members attribute.
  • No need to trime channel names anymore?

@pm5
Copy link
Contributor Author

pm5 commented Jun 6, 2023

I should've done TDD 🙄

Copy link
Owner

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

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

The API has changed quite a bit, it's probably gonna be a bit of an effort updating it to the current state.

src/lib/slacko.ml Outdated Show resolved Hide resolved
@@ -248,8 +248,8 @@ type channel_obj = {
creator: user;
is_archived: bool;
is_general: bool;
name_normalized: string;
Copy link
Owner

Choose a reason for hiding this comment

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

I guess conversations.list returns a conversation and not a channel_obj, so this needs to be updated somehow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It returns "a list of limited channel-like conversation objects".

Choose a reason for hiding this comment

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

In such case I suggest renaming it to conversation_obj since the Slack API calls it the "conversation type".

I think in this case the API breakage is happening anyway so might as well stick to the naming that Slack uses so it is easier to understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like channels.* API was superseded along with im.* and others by conversations.*. However, there are still channel, group, im, mpim API object types, that are different from conversation type. The codebase also has a conversation type, which is not the type for the conversation API object. It seems instead of attempting a fix to the notify CLI tool now, we need to overhaul the underlying types first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is now built on #52 which provides a new conversation_obj type. I'm not sure about the types of id this new API can have though.

@pm5 pm5 mentioned this pull request Aug 29, 2023
fix: conversations.list api
@Leonidas-from-XIV Leonidas-from-XIV merged commit afc683c into Leonidas-from-XIV:master Jan 25, 2024
3 checks passed
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.

2 participants