# HG changeset patch # User Mikael Berthe # Date 1536350230 -7200 # Node ID 55accc8c0fe1c9c281dbeffe7d9e0a3c3215ef01 # Parent 747f108d582100b7d1bf41afe063451cbdef29b3 Add "stream direct" for direct messages stream diff -r 747f108d5821 -r 55accc8c0fe1 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"