Skip to content

Commit

Permalink
Add conversations.mark command to replace channels.mark
Browse files Browse the repository at this point in the history
  • Loading branch information
cixtor committed Dec 5, 2020
1 parent a7bb583 commit b7bb93a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions funs.go
Expand Up @@ -129,6 +129,14 @@ func (cli *CLI) CallConversationsArchive() int {
return cli.PrintJSON(cli.api.ConversationsArchive(flag.Arg(1)))
}

// CallConversationsMark sends a http request with the conversations.mark action.
func (cli *CLI) CallConversationsMark() int {
return cli.PrintJSON(cli.api.ConversationsMark(slackapi.ConversationsMarkInput{
Channel: flag.Arg(1),
Timestamp: flag.Arg(2),
}))
}

// CallConversationsRename sends a http request with the conversations.rename action.
func (cli *CLI) CallConversationsRename() int {
return cli.PrintJSON(cli.api.ConversationsRename(flag.Arg(1), flag.Arg(2)))
Expand Down
1 change: 1 addition & 0 deletions main.go
Expand Up @@ -26,6 +26,7 @@ func main() {
cli.Register(cli.CallChatRobotMessage, "chat.robotMessage", []string{"channel", "text"}, "Sends a message to a channel as a robot")
cli.Register(cli.CallChatUpdate, "chat.update", []string{"channel", "time", "text"}, "Updates a message")
cli.Register(cli.CallConversationsArchive, "conversations.archive", []string{"room"}, "Archives a conversation")
cli.Register(cli.CallConversationsMark, "conversations.mark", []string{"room", "time"}, "Sets the read cursor in a channel")
cli.Register(cli.CallConversationsRename, "conversations.rename", []string{"room", "name"}, "Renames a conversation")
cli.Register(cli.CallConversationsSetPurpose, "conversations.setPurpose", []string{"room", "purpose"}, "Sets the purpose for a conversation")
cli.Register(cli.CallConversationsSetTopic, "conversations.setTopic", []string{"room", "topic"}, "Sets the topic for a conversation")
Expand Down

0 comments on commit b7bb93a

Please sign in to comment.