Edit Channel

Metadata

Metadata is a general purpose data store that is automatically synchronized to all the channel members. It is meant as an elegant mechanism to store contextual information about a specific channel. The data can be any number of JSON key-value pairs up to 100 kb. Example use cases include:

  • Conversation title or cover photo

  • Global conversation settings

Metadata is implemented with last writer wins semantics: multiple mutations by independent users to the metadata object will result in a single stored value. No locking, merging, or other coordination is performed across multiple writes on the data.

To set metadata, call the setMetadata: method:

The latest metadata of the channel is always exposed as part of the metadata property on the channel model.

Display Name

Every channel contains an optional displayName property. This property is mainly used to identify the channel in push notifications, but it is also exposed to the application via AmityChannel object.

You can set a channel's displayName with the following method:

Last updated