Introduction
The Osmium Chat Protocol messaging system provides a comprehensive set of features for sending, editing, searching, and managing messages across different chat types. Messages can be sent to users, groups, channels, or yourself (saved messages).Message Structure
Messages in Osmium follow a well-defined structure that supports rich content, media attachments, and formatting:Message Types
Messages can have different types to represent various events:UNKNOWN(0) - Default message type for text messagesCALL(1) - Voice or video call messageJOIN(2) - User joined the chatLEAVE(3) - User left the chat
Chat References
All messaging operations require aChatRef to specify the target chat. A ChatRef can point to:
UserRef
For direct messages to a specific user:ChannelRef
For messages in a community channel:GroupRef
For messages in a group chat:RefSelf
For saved messages (messages to yourself):Message Operations
The messaging system supports the following operations:- Send Message - Send new messages with text, media, and formatting
- Message History - Retrieve message history with pagination
- Edit/Delete/Forward - Modify or remove existing messages
- Search - Search for messages by query text
- Message Entities - Format text with bold, italic, mentions, and more
Snowflake IDs
All message IDs, user IDs, and chat IDs use snowflake identifiers (fixed64). Snowflakes are 64-bit integers that encode timestamp information and are sortable by creation time.