Skip to content

Commit

Permalink
Delete stale references to ChatConfig (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
prprabhu-ms authored May 21, 2021
1 parent 43a6123 commit a2437d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ const getDocs: () => JSX.Element = () => {
<Heading>Prerequisites</Heading>
<Description>
ChatComposite provides the UI for an *existing user* in an *existing thread*. Thus, the user and thread must be
created beforehand. Typically, the user and thread are created on a Contoso-owned service, and the `ChatConfig`
is served to the client app that then passes it to the ChatComposite.
created beforehand. Typically, the user and thread are created on a Contoso-owned service and authentication
tokens are served to the client application that then passes it to the ChatComposite.
</Description>
<Source code={serverText} />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,7 @@ import { ChatClient } from '@azure/communication-chat';
import { AzureCommunicationTokenCredential } from '@azure/communication-common';
import { CommunicationIdentityClient } from '@azure/communication-identity';

type ChatConfig = {
token: string;
endpointUrl: string;
displayName: string;
threadId: string;
};

export const createUserAndThread = async (
resourceConnectionString: string,
displayName: string
): Promise<ChatConfig> => {
export const createUserAndThread = async (resourceConnectionString: string, displayName: string): Promise<any> => {
const tokenClient = new CommunicationIdentityClient(resourceConnectionString);
const user = await tokenClient.createUserAndToken(['chat']);

Expand Down

0 comments on commit a2437d8

Please sign in to comment.