New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/omnichannel-chat-sdk

Package Overview
Dependencies
Maintainers
5
Versions
365
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/omnichannel-chat-sdk - npm Package Compare versions

Comparing version 1.10.5 to 1.10.6-main.348dce2

2

package.json
{
"name": "@microsoft/omnichannel-chat-sdk",
"version": "1.10.5",
"version": "1.10.6-main.348dce2",
"description": "Microsoft Omnichannel Chat SDK",

@@ -5,0 +5,0 @@ "files": [

@@ -56,2 +56,3 @@ # Omnichannel Chat SDK 💬

- [Chat Reconnect with Unauthenticated User](#chat-reconnect-with-unauthenticated-user)
- [Handling chat Disconnect on Mobile platform](#handling-chat-disconnect-on-mobile-platform)
- [Operating Hours](#operating-hours)

@@ -778,2 +779,25 @@ - [Single Sign-on for Bots](/docs/scenarios/SINGLE_SIGN_ON_FOR_BOTS.md)

### Handling chat Disconnect on Mobile platform
> On mobile platforms, where users often switch the app between foreground and background, it is important to verify if the chat is still active before allowing the user to send a message after returning from the background .
```ts
// 1. Register a listener for visbilitychange event
window.addEventListener("visibilitychange", async () => {
// 2. verify if the browser is in the foreground by checking the document.hidden property
if (!document.hidden) {
//3. Check conversation state by making a call to getConversationDetails
const optionalParams = {
liveChatContext: {}, // EXISTING chat context data
};
const conversationDetails = await chatSDK.getConversationDetails(optionalParams);
if (conversationDetails?.state === "WrapUp" || conversationDetails?.state === "Closed") {
//4. Show disconnect notification to customer and disable the input box so that user cannot send a message
}
}
});
```
### Using [BotFramework-WebChat](https://github.com/microsoft/BotFramework-WebChat)

@@ -780,0 +804,0 @@ > :warning: Currently supported on web only

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc