Skip to content

Commit ef15086

Browse files
authored
Merge pull request #222 from rikoe/bugfix/api-getCurrentChannel
fix(api): getCurrentChannel
2 parents 8e4040c + 9333f47 commit ef15086

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

docs/api/ref/DesktopAgent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface DesktopAgent {
2626
getOrCreateChannel(channelId: string): Promise<Channel>;
2727
getSystemChannels(): Promise<Array<Channel>>;
2828
joinChannel(channelId: string) : Promise<void>;
29-
getCurrentChannel() : Promise<void>;
29+
getCurrentChannel() : Promise<Channel>;
3030
leaveCurrentChannel() : Promise<void>;
3131
}
3232
```

src/api/DesktopAgent.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,11 @@ interface DesktopAgent {
147147
* `Error` with a string from the `ChannelError` enumeration.
148148
*/
149149
getOrCreateChannel(channelId: string): Promise<Channel>;
150+
151+
/**
152+
* Returns the `Channel` object for the current channel membership.
153+
*
154+
* Returns `null` if the app is not joined to a channel.
155+
*/
156+
getCurrentChannel() : Promise<Channel>;
150157
}

website/versioned_docs/version-1.1/api/ref/DesktopAgent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface DesktopAgent {
2727
getOrCreateChannel(channelId: string): Promise<Channel>;
2828
getSystemChannels(): Promise<Array<Channel>>;
2929
joinChannel(channelId: string) : Promise<void>;
30-
getCurrentChannel() : Promise<void>;
30+
getCurrentChannel() : Promise<Channel>;
3131
leaveCurrentChannel() : Promise<void>;
3232
}
3333
```

0 commit comments

Comments
 (0)