Skip to content

Commit

Permalink
Merge pull request #51 from ACyphus/add-private-channel-sending
Browse files Browse the repository at this point in the history
Add the ability to send messages to a private channel and update help text to use channel name
  • Loading branch information
rneatherway authored Aug 29, 2023
2 parents 211b567 + 71a6f2b commit 6390aac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This project provides a means of archiving a Slack conversation or thread as mar
gh slack -i <issue-url> <slack-permalink> # defaults to read command
gh slack read <slack-permalink>
gh slack read -i <issue-url> <slack-permalink>
gh slack send -m <message> -c <channel-id> -t <team-name>
gh slack send -m <message> -c <channel-name> -t <team-name>

# Example configuration (add to gh's configuration file at $HOME/.config/gh/config.yml):
extensions:
Expand Down
2 changes: 1 addition & 1 deletion cmd/gh-slack/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var rootCmd = &cobra.Command{
Example: ` gh-slack -i <issue-url> <slack-permalink> # defaults to read command
gh-slack read <slack-permalink>
gh-slack read -i <issue-url> <slack-permalink>
gh-slack send -m <message> -c <channel-id> -t <team-name>
gh-slack send -m <message> -c <channel-name> -t <team-name>
` + sendConfigExample,
}

Expand Down
5 changes: 2 additions & 3 deletions internal/slackclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,8 @@ func (c *SlackClient) conversations() ([]Channel, error) {
"exclude_archived": "true",
"limit": "1000",

// TODO: this is the default, we might want to support private
// channels and DMs in the future
"types": "public_channel",
// TODO: we might want to support DMs in the future
"types": "public_channel, private_channel",
},
)
if err != nil {
Expand Down

0 comments on commit 6390aac

Please sign in to comment.