Messaging

This section highlights the steps you will need to follow to begin integrating chat messaging into your products

The message payload is always the same regardless of which Development Kit the user is using. Users also have a choice on what type of message they want to send.‌

Message Description

Messages are JSON content containers that can have up to 20,000 characters or can weigh up to 100KB for custom messages. They will be synchronized among all channel users in real-time. If a message requires larger binary data (such as when sending files), we recommend to upload the data to another cloud storage service, such as AWS S3, and store the URL to the content in the message data.

In addition to the JSON message type, the SDK also provides support for common text and image message types. These additional types are built on top of the standard JSON message layer.

In case of image messages, the SDK freely provides a cloud storage service that will process and store all images uploaded: you don't need to set up and manage a separate cloud storage service for this common case.

All messaging methods are contained in a AmityMessageRepository class. Before calling any messaging methods, you must ensure to first instantiate a repository instance using the AmityClient instance you created on setup.

let messageRepository = AmityMessageRepository(client: client)

Refer to the following sections for a more detailed discussion on tasks related to messages:

Last updated