Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Chat overview

Chat is a use case built on DNotifier's realtime 1:1 messaging layer. You send messages between user IDs, optionally persist history, and build conversation UIs β€” for support, social, team collaboration, and in-app messaging.

Chat is not a separate transport. It uses send() for delivery and chat-specific APIs for history. For raw live updates without conversation semantics, see Realtime communication overview.


Chat vs realtime communication

Aspect
Realtime communication
Chat

Purpose

Deliver payloads to IDs

Human (or bot) conversations

History

Optional per message (saveHistory)

Fetch thread via fetchChatHistory

UX

Events, metrics, notifications

Threads, bubbles, read state (your UI)

Participants

Any sender/receiver IDs

Typically paired user IDs or user ↔ bot

Both use the same senderId / receiverId addressing model over WebSocket.


Core building blocks

  connect (ws)
       β”‚
       β”œβ”€β”€ fetchChatHistory on thread open
       β”‚
       β”œβ”€β”€ send({ data, saveHistory: true })  β†’ live delivery + persistence
       β”‚
       β”œβ”€β”€ onMessage  β†’ append incoming messages to UI
       β”‚
       └── deleteChatHistoryMessage  β†’ moderation / user delete
API
Role

send()

Deliver message to peer; persist when saveHistory is true

fetchChatHistory()

Load past messages for a thread

deleteChatHistoryMessage()

Remove a stored message

onMessage

Receive live messages and history responses


Topics in this section

Topic
Description

Connect, send, receive pattern

fetchChatHistory

deleteChatHistoryMessage

Per-message persistence

Threads, bubbles, typing


Prerequisites


Use cases

For product-oriented chat scenarios (support, social, team tools), see Chat use cases.


Chat vs AI chat

Type
API
Purpose

User ↔ user (or agent)

send, chat history

Human conversations

User ↔ AI assistant

sendAI, AI history

LLM sessions, RAG

You can embed both in one app with separate tabs and history backends.

β†’ AI overview

Last updated