Real-Time Messaging Foundation: social.plus Chat provides a robust messaging system with support for various content types, real-time synchronization, and advanced features like reactions, threading, and moderation. Build engaging chat experiences with flexible message handling and rich content support.

Messaging Overview

social.plus Chat messaging system enables real-time communication through JSON-based message containers that support diverse content types and advanced interaction features.

Message Types

Flexible content support
  • Text messages with rich formatting
  • Image messages with metadata
  • File attachments and documents
  • Custom JSON message types

Real-Time Features

Live communication
  • Real-time message synchronization
  • Live typing indicators
  • Message reactions and interactions
  • Thread and reply support

Message Architecture

Understanding message fundamentalsMessages are JSON content containers that can contain up to 20,000 characters or weigh up to 100KB for custom messages. They are synchronized among all channel users in real-time, providing instant communication across all connected clients.

Message Capacity

Content TypeLimitRecommendation
Text Content20,000 charactersOptimal for rich text and formatted content
Custom JSON100KB total sizeIdeal for structured data and metadata
Binary DataExternal storageUse cloud storage URLs for large files

Storage Strategy

For messages requiring larger binary data (such as files, high-resolution images, or documents), we recommend uploading the data to cloud storage services like AWS S3, Google Cloud Storage, or Azure Blob Storage, then storing the URL reference in the message data.
Cross-Platform Compatibility: The message payload structure remains consistent across all development platforms (iOS, Android, Web, Flutter), ensuring seamless communication regardless of client type.

Message Data Structure

Core Message Properties

PropertyTypeDescriptionNotes
messageIdStringUnique identifier for the messageAuto-generated, immutable
channelIdStringChannel where the message was createdLinks message to conversation
userIdStringID of the user who created the messageMessage author identification
typeStringMessage type identifiertext, image, file, custom
dataObjectMessage content and metadataType-specific structure

Relationship Properties

PropertyTypeDescriptionUse Case
parentIdStringParent message ID for repliesThreading and conversation organization
childrenNumberIntegerCount of reply messagesThread management and UI indicators

Content Management

PropertyTypeDescriptionBehavior
tagsArray<String>Message categorization labelsFiltering and organization
isDeletedBooleanSoft deletion statusPreserves structure while hiding content

Timestamps

PropertyTypeDescriptionUse Case
createdAtDateMessage creation timestampChronological ordering
updatedAtDateLast modification timestampChange tracking
editedAtDateLast edit timestampEdit history and indicators

Engagement Metrics

PropertyTypeDescriptionStructure
reactionsObjectReaction data with counts{ "like": 5, "heart": 2 }
reactionsCountIntegerTotal reaction countSum of all reaction types
myReactionsArray<String>Current user’s reactions["like", "heart"]
flagCountIntegerNumber of user flagsModeration metric

Implementation Patterns

Key Features

Getting Started

1

Basic Message Sending

Start with simple text message implementation using the Chat SDK’s text message APIs
2

Add Rich Content

Integrate image and file sharing capabilities with external storage solutions
3

Implement Interactions

Add reactions, editing, and threading features for enhanced user engagement
4

Enable Real-Time

Implement live collections and real-time synchronization for dynamic conversations
5

Add Moderation

Integrate content moderation, flagging, and administrative controls
Development Strategy: Begin with basic text messaging, then progressively add rich content support, interactive features, and moderation capabilities. Focus on real-time synchronization early to ensure smooth user experiences across all connected clients.