CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

pubnub/pubnub-chat

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%

Overview
Eval results
Skill reviews
Files

task.mdevals/scenario-4/

Direct Messaging Service Module

Context

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.

Task

Write a JavaScript module (dm-service.js) that provides:

  1. A function to open a direct conversation between the current user and another user, given the other user's ID and display name
  2. Efficient handling when the same conversation is opened multiple times during a session
  3. Proper handling when the target user does not yet exist in the system

Assume a Chat SDK instance is passed in during initialization.

Expected Outputs

  • A dm-service.js file with a class or set of functions for managing direct message conversations.
tessl i pubnub/pubnub-chat@0.1.4

evals

SKILL.md

tile.json