diff --git a/docs/api/ref/DesktopAgent.md b/docs/api/ref/DesktopAgent.md index d9c637a2b..1e86be59b 100644 --- a/docs/api/ref/DesktopAgent.md +++ b/docs/api/ref/DesktopAgent.md @@ -26,7 +26,7 @@ interface DesktopAgent { getOrCreateChannel(channelId: string): Promise; getSystemChannels(): Promise>; joinChannel(channelId: string) : Promise; - getCurrentChannel() : Promise; + getCurrentChannel() : Promise; leaveCurrentChannel() : Promise; } ``` diff --git a/src/api/DesktopAgent.ts b/src/api/DesktopAgent.ts index ff2689721..1f9c6efc0 100644 --- a/src/api/DesktopAgent.ts +++ b/src/api/DesktopAgent.ts @@ -147,4 +147,11 @@ interface DesktopAgent { * `Error` with a string from the `ChannelError` enumeration. */ getOrCreateChannel(channelId: string): Promise; + + /** + * Returns the `Channel` object for the current channel membership. + * + * Returns `null` if the app is not joined to a channel. + */ + getCurrentChannel() : Promise; } \ No newline at end of file diff --git a/website/versioned_docs/version-1.1/api/ref/DesktopAgent.md b/website/versioned_docs/version-1.1/api/ref/DesktopAgent.md index d82f0747f..79a57fd7d 100644 --- a/website/versioned_docs/version-1.1/api/ref/DesktopAgent.md +++ b/website/versioned_docs/version-1.1/api/ref/DesktopAgent.md @@ -27,7 +27,7 @@ interface DesktopAgent { getOrCreateChannel(channelId: string): Promise; getSystemChannels(): Promise>; joinChannel(channelId: string) : Promise; - getCurrentChannel() : Promise; + getCurrentChannel() : Promise; leaveCurrentChannel() : Promise; } ```