Skip to content

Commit

Permalink
Update README.md with chat rehydration
Browse files Browse the repository at this point in the history
  • Loading branch information
mrajatttt authored Jun 16, 2024
1 parent 326c71b commit 0bedc7f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,27 @@ chatSession.onDeepHeartbeatFailure(event => {

Subscribes an event handler that triggers when deep heartbeat fails.

##### `chatSession.onChatRehydrated()`
**Note**: Only when persistent chat is enabled.
```js
/**
* Subscribes an event handler that triggers whenever a "application/vnd.amazonaws.connect.event.chat.rehydrated" event is fired.
* @param {
AbsoluteTime?: string,
ContentType?: string,
Type?: string,
ParticipantId?: string,
DisplayName?: string,
ParticipantRole?: string,
InitialContactId?: string
} event.data
*/
chatSession.onChatRehydrated(event => {
const { chatDetails, data } = event;
// Load previous transcript...
});
```

#### Client side metric

In version `1.2.0` the client side metric(CSM) service is added into this library. Client side metric can provide insights into the real performance and usability, it helps us to understand how customers are actually using the website and what UI experiences they prefer. This feature is enabled by default. User can also disable this feature by passing a flag: `disableCSM` when they create a new chat session:
Expand Down

0 comments on commit 0bedc7f

Please sign in to comment.