Skip to content

Commit 57a0636

Browse files
committed
Release 0.2.4
1 parent bd48bd1 commit 57a0636

File tree

6 files changed

+32
-8
lines changed

6 files changed

+32
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ $ npm install -g getstream-cli
106106
$ stream COMMAND
107107
running 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]
111111
USAGE
112112
$ stream COMMAND

build/commands/chat/channel/hide.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff 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

7177
ChannelHide.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.',

build/commands/chat/channel/show.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff 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

7177
ChannelShow.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.',

docs/chat.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ USAGE
7777
$ stream chat:channel:create
7878
7979
OPTIONS
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
124124
OPTIONS
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
193194
OPTIONS
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`

oclif.manifest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
},

0 commit comments

Comments
 (0)