Skip to main content
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

  • Core Concepts
  • Message Types
  • Advanced Features
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

Implementing comprehensive message creationBasic Text Messages
  1. Validate user permissions and channel access
  2. Prepare message data with required fields
  3. Send message through appropriate SDK method
  4. Handle real-time updates and acknowledgments
Rich Content Messages
  1. Upload binary content to external storage (if applicable)
  2. Generate content URLs and metadata
  3. Create message with structured data payload
  4. Implement progress indicators for uploads
Message Composition Best Practices
  • Implement draft saving for longer messages
  • Validate content before sending
  • Handle network failures gracefully
  • Provide sending status feedback
Managing live message updatesLive Collections Implementation
  • Subscribe to message collections for real-time updates
  • Handle message additions, modifications, and deletions
  • Implement efficient UI updates with minimal re-rendering
  • Manage memory usage with proper collection lifecycle
Conflict Resolution
  • Handle concurrent message edits gracefully
  • Implement optimistic UI updates with rollback capability
  • Manage offline message queuing and synchronization
  • Provide clear feedback for failed operations
Performance Optimization
  • Implement message pagination for large conversations
  • Use efficient data structures for message storage
  • Optimize network usage with smart caching
  • Handle large channel member counts efficiently
Organizing and moderating message contentThreading and Organization
  • Implement intuitive reply and thread interfaces
  • Manage nested conversation depth appropriately
  • Provide clear thread navigation and context
  • Handle thread collapse and expansion efficiently
Moderation Workflows
  • Implement user flagging with clear reporting options
  • Design admin interfaces for content review
  • Handle message deletion with appropriate user feedback
  • Maintain audit trails for moderation actions
Content Filtering
  • Implement client-side content validation
  • Handle server-side filtering responses
  • Provide user education on content policies
  • Design appeals and review processes
Creating engaging messaging interfacesMessage Display
  • Design clear message bubbles with proper spacing
  • Implement read receipts and delivery indicators
  • Show typing indicators and user presence
  • Handle message states (sending, sent, delivered, read)
Interactive Elements
  • Implement intuitive reaction interfaces
  • Design clear edit and delete controls
  • Provide smooth animation for message updates
  • Handle long-press and gesture interactions
Accessibility Considerations
  • Implement proper screen reader support
  • Provide keyboard navigation for all features
  • Use appropriate color contrast and sizing
  • Support voice control and alternative input methods

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.