amazon-connect / amazon-connect-chatjs

Amazon Connect ChatJS - a browser-based contact center integration API for Chat on the Agent and Customer side.
https://docs.aws.amazon.com/connect/latest/adminguide/what-is-amazon-connect.html
Apache License 2.0
91 stars 53 forks source link

add websocket onClose callback #209

Closed mhiaror closed 5 months ago

mhiaror commented 5 months ago

Issue #, if available: add websocket onClose callback

Description of changes: Currently, when websocket connection is closed, onClose is called but is not exposed from ChatJs. We only expose onConnectionLost which is fired if both primary and secondary websocket connection has been closed.

Customer also wants to listed to onClose event so they can immidiately start polling for getTranscript.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.