Product update · · 1 min read

Build a custom inbox with TalkJS: Real-time conversation subscriptions

Learn how to build a custom inbox with real-time updates using TalkJS conversation subscriptions in the JavaScript Data API.

A schematic outline representation of a conversation list, with message bubbles floating against a gradient background.

You can now build your own custom inbox or message center with TalkJS. The new TalkSession.subscribeConversations method for the JavaScript Data API allows you to get real-time updates about any conversations in your app.

Subscribing to a conversation returns a ConversationListSubscription.

Conversation subscriptions are 'windowed'. Initially, the conversation subscription window contains the 20 most recent conversations, ordered by last activity. The last activity of a conversation is either joinedAt or lastMessage.createdAt, whichever is higher.

You can expand the window of a conversation subscription by calling loadMore, which extends the window further into the past.

Whenever a user joins a new conversation, or when an old conversation receives new messages, the conversation subscription window automatically expands to include those.