Skip to content

Commit

Permalink
Specify how to track usage of Chat SDK
Browse files Browse the repository at this point in the history
As described by 45b9796.
  • Loading branch information
lawrence-forooghian committed Feb 12, 2025
1 parent 45b9796 commit 5c03972
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions textile/chat-features.textile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ h2(#general). General Principles
* @(CHA-GP3)@ Wherever possible, Chat features should be exposed in the public API as properties of their parent. For example, @messages@ would be considered a property of a @room@ object. This allows for greater composability and extensibility in the future.
* @(CHA-GP4)@ Avoid overloading methods and optional parameters. Prefer object-type parameters wherever practical and idiomatic.

h2(#initialization). Initialization

* @(CHA-IN1)@ In order to initialize a chat client, the user must supply an instance of @RealtimeClient@. Upon initialization, the chat client must configure this client in order to allow Ably to track usage of the Chat SDK, as described in the sub-items below.
** @(CHA-IN1a)@ @[Testable]@ Upon initialization of the chat client, it must create a wrapper SDK proxy client by calling @createWrapperSDKProxy@ on the @RealtimeClient@.
** @(CHA-IN1b)@ @[Testable]@ When creating the @CHA-IN1a@ wrapper SDK proxy client, the chat client must pass a @WrapperSDKProxyOptions@ whose @agents@ describe the Chat SDK and its version. For example, @{ "agents": { "chat-js": "1.0.1" } }@.
** @(CHA-IN1c)@ SDK authors must ensure that they have registered the agents used by @CHA-IN1b@ in the common repository, per "@RSC7d5@":features#RSC7d5.
** @(CHA-IN1d)@ @[Testable]@ The chat client must use the wrapper SDK proxy client created in @CHA-IN1a@ as the realtime client on which it performs all subsequent actions (for example, fetching channels or calling @#request@).

h2(#rooms). Rooms

h3(#rooms-general). General Information
Expand Down

0 comments on commit 5c03972

Please sign in to comment.