File tree Expand file tree Collapse file tree 6 files changed +32
-8
lines changed
build/commands/chat/channel Expand file tree Collapse file tree 6 files changed +32
-8
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ $ npm install -g getstream-cli
106106$ stream COMMAND
107107running command...
108108$ stream (-v| --version| version)
109- getstream-cli/0.2.3 linux-x64 node-v14.10.0
109+ getstream-cli/0.2.4 linux-x64 node-v14.10.0
110110$ stream --help [COMMAND]
111111USAGE
112112 $ stream COMMAND
Original file line number Diff line number Diff line change @@ -17,8 +17,14 @@ class ChannelHide extends _command.Command {
1717 } = this . parse ( ChannelHide ) ;
1818
1919 try {
20- if ( ! flags . channel || ! flags . type ) {
20+ if ( ! flags . channel || ! flags . type || ! flags . user ) {
2121 const res = await ( 0 , _enquirer . prompt ) ( [ {
22+ type : 'input' ,
23+ name : 'user' ,
24+ hint : 'user-123' ,
25+ message : 'What is the ID of the user you wish to hide the channel from?' ,
26+ required : true
27+ } , {
2228 type : 'input' ,
2329 name : 'channel' ,
2430 message : `What is the unique identifier for the channel?` ,
@@ -55,7 +61,7 @@ class ChannelHide extends _command.Command {
5561
5662 const client = await ( 0 , _chatAuth . chatAuth ) ( this ) ;
5763 const channel = client . channel ( flags . type , flags . channel ) ;
58- await channel . hide ( ) ;
64+ await channel . hide ( flags . user ) ;
5965 this . log ( `The channel ${ _chalk . default . bold ( flags . channel ) } has been hidden.` ) ;
6066 this . exit ( ) ;
6167 } catch ( error ) {
@@ -69,6 +75,11 @@ class ChannelHide extends _command.Command {
6975}
7076
7177ChannelHide . flags = {
78+ user : _command . flags . string ( {
79+ char : 'u' ,
80+ description : 'User ID' ,
81+ required : false
82+ } ) ,
7283 channel : _command . flags . string ( {
7384 char : 'c' ,
7485 description : 'The channel ID you wish to remove.' ,
Original file line number Diff line number Diff line change @@ -17,8 +17,14 @@ class ChannelShow extends _command.Command {
1717 } = this . parse ( ChannelShow ) ;
1818
1919 try {
20- if ( ! flags . channel || ! flags . type ) {
20+ if ( ! flags . channel || ! flags . type || ! flags . user ) {
2121 const res = await ( 0 , _enquirer . prompt ) ( [ {
22+ type : 'input' ,
23+ name : 'user' ,
24+ hint : 'user-123' ,
25+ message : 'What is the ID of the user you wish to show the channel to?' ,
26+ required : true
27+ } , {
2228 type : 'input' ,
2329 name : 'channel' ,
2430 message : `What is the unique identifier for the channel?` ,
@@ -55,7 +61,7 @@ class ChannelShow extends _command.Command {
5561
5662 const client = await ( 0 , _chatAuth . chatAuth ) ( this ) ;
5763 const channel = client . channel ( flags . type , flags . channel ) ;
58- await channel . show ( ) ;
64+ await channel . show ( flags . user ) ;
5965 this . log ( `The channel ${ _chalk . default . bold ( flags . channel ) } has been shown.` ) ;
6066 this . exit ( ) ;
6167 } catch ( error ) {
@@ -69,6 +75,11 @@ class ChannelShow extends _command.Command {
6975}
7076
7177ChannelShow . flags = {
78+ user : _command . flags . string ( {
79+ char : 'u' ,
80+ description : 'User ID' ,
81+ required : false
82+ } ) ,
7283 channel : _command . flags . string ( {
7384 char : 'c' ,
7485 description : 'The channel ID you wish to remove.' ,
Original file line number Diff line number Diff line change 7777 $ stream chat:channel:create
7878
7979OPTIONS
80- -c, --channel=channel [default: e3ff4f2e-dfb7-4c5f-b54d-2b11597bda17 ] A unique ID for the channel you wish to create.
80+ -c, --channel=channel [default: 59b33c3d-d61f-4c8d-a1ef-f4fae082765d ] A unique ID for the channel you wish to create.
8181 -d, --data=data Additional data as JSON.
8282 -i, --image=image URL to channel image.
8383 -j, --json Output results in JSON. When not specified, returns output in a human friendly format.
@@ -124,6 +124,7 @@ USAGE
124124OPTIONS
125125 -c, --channel=channel The channel ID you wish to remove.
126126 -t, --type=type Type of channel.
127+ -u, --user=user User ID
127128```
128129
129130## ` stream chat:channel:list `
@@ -193,6 +194,7 @@ USAGE
193194OPTIONS
194195 -c, --channel=channel The channel ID you wish to remove.
195196 -t, --type=type Type of channel.
197+ -u, --user=user User ID
196198```
197199
198200## ` stream chat:channel:type `
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 11{
22 "name" : " getstream-cli" ,
33 "description" : " Configure & manage Stream applications from the command line. 🚀" ,
4- "version" : " 0.2.3 " ,
4+ "version" : " 0.2.4 " ,
55 "bin" : {
66 "stream" : " ./build/bin/run"
77 },
You can’t perform that action at this time.
0 commit comments