Build chat applications with PubNub Chat SDK
Agent Success
Agent success rate when using this tile
95%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.83x
Baseline
Agent success rate without this tile
52%
You are building a messaging application using the PubNub Chat SDK. Users can initiate one-on-one conversations with any other user in the system. The same two users may open their conversation many times throughout a session, and the application should handle this efficiently without redundant operations. Users may or may not already exist in the PubNub system when a conversation is initiated.
Write a JavaScript module (dm-service.js) that provides:
Assume a Chat SDK instance is passed in during initialization.
dm-service.js file with a class or set of functions for managing direct message conversations.