Skip to content

Add-chat Webpack and ACS SDK Version Update #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions add-chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ This quickstart sample includes the code that is explained as part of [this docu
- A User Access Token to instantiate the call client. [Learn how to create and manage user access tokens](https://docs.microsoft.com/azure/communication-services/quickstarts/access-tokens?pivots=programming-language-javascript).
- Create three ACS Users and issue them a user access token [User Access Token](https://docs.microsoft.com/en-us/azure/communication-services/quickstarts/access-tokens?pivots=programming-language-javascript). Be sure to set the scope to chat, and note the token string as well as the userId string. The full demo creates a thread with two initial participants and then adds a third participant to the thread.

## Install the NPM modules
npm install

## Build the code
npm build

## Run the code
npm run start
Expand Down
6 changes: 3 additions & 3 deletions add-chat/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ createChatThread().then(async threadId => {
{
participants: [
{
id: { communicationUserId: '<NEW_PARTICIPANT_USER_ID>' },
displayName: 'Jane'
id: { communicationUserId: '<ANOTHER_USER_ID>' },
displayName: '<ANOTHER_USER_DISPLAY_NAME>'
}
]
};
Expand All @@ -87,7 +87,7 @@ createChatThread().then(async threadId => {
}

// <Remove user from a chat thread>
await chatThreadClient.removeParticipant({ communicationUserId: '<NEW_PARTICIPANT_USER_ID>' });
await chatThreadClient.removeParticipant({ communicationUserId: '<USER_ID>' });
const users = chatThreadClient.listParticipants();
for await (const user of users) {
console.log(`participants in thread available:${user.id.communicationUserId}`);
Expand Down
2 changes: 1 addition & 1 deletion add-chat/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<body>
<h4>Azure Communication Services</h4>
<h1>Chat Quickstart</h1>
<script src="./bundle.js"></script>
<script src="./dist/main.js"></script>
</body>
</html>
Loading