Add "stream direct" for direct messages stream
authorMikael Berthe <mikael@lilotux.net>
Fri, 07 Sep 2018 21:57:10 +0200
changeset 236 55accc8c0fe1
parent 235 747f108d5821
child 237 ac5ce4c0e79b
Add "stream direct" for direct messages stream
cmd/stream.go
--- a/cmd/stream.go	Fri Sep 07 21:47:36 2018 +0200
+++ b/cmd/stream.go	Fri Sep 07 21:57:10 2018 +0200
@@ -27,7 +27,7 @@
 
 // streamCmd represents the stream command
 var streamCmd = &cobra.Command{
-	Use:   "stream [user|local|public|!LIST|:HASHTAG]",
+	Use:   "stream [user|local|public|direct|!LIST|:HASHTAG]",
 	Short: "Listen to an event stream",
 	Long: `Listen to an event stream
 
@@ -39,6 +39,7 @@
 	Example: `  madonctl stream           # User timeline stream
   madonctl stream local     # Local timeline stream
   madonctl stream public    # Public timeline stream
+  madonctl stream direct    # Direct messages stream
   madonctl stream '!42'     # List (ID 42)
   madonctl stream :mastodon # Hashtag
   madonctl stream #madonctl
@@ -51,7 +52,7 @@
   madonctl stream :madonctl,mastodon,api
 `,
 	RunE:       streamRunE,
-	ValidArgs:  []string{"user", "public"},
+	ValidArgs:  []string{"user", "public", "direct"},
 	ArgAliases: []string{"home"},
 }
 
@@ -76,6 +77,7 @@
 		switch arg {
 		case "", "user":
 		case "public":
+		case "direct":
 			streamName = arg
 		case "local":
 			streamName = "public:local"