Links

Channels

Our channels enable developers to implement different types of chat messaging capabilities into their applications easily
In this section, we will cover the concept of channels in Amity Chat SDK and how to use them to enable different types of chat messaging capabilities in your application.
Channels are virtual chat rooms or groups that allow users to send and receive messages in real-time. Developers can create new channels, join existing channels, and customize channels with features such as read receipts, typing indicators, and push notifications. Channels also offer moderation capabilities, allowing developers to assign moderators and admins via a role-based permission system and filter out inappropriate content with automated spam filtering and URL whitelists.

Channel Types

Amity's Chat SDK has several channel types with different use cases. Each type is designed to match a particular use-case for chat channels.

Community Channel

The community channel is the default channel type and can be discovered by all users and admins. It acts as a public chat channel that showcases all of the features that our SDK's have to offer.

Channel characteristics:

  • All users in the network can search for community channel
  • All users in the network can join the community without an invitation
  • Support @mention user
  • Support @mention all users in the channel
  • Appear on ASC Console for administrator to monitor

Typical use cases:

  • Team collaboration
  • Online gaming
  • Celebrity fan club
  • Live streaming
  • Any type of public chat

Live Channel

Live channels offer the ability for users and admins to create channels with exclusive membership. The live channel is identical to our Community channel in features with the caveat that users will not be able to discover the channel when querying for all channels unless they are already a member of it. However, users and admins can still invite other users to join the channel.

Channel characteristics

  • Can only be searched by member
  • Users can join if they know channel ID
  • Support @mention user
  • Support @mention channel users (mention all users)
  • Appear on the ASC console for administrator to monitor

Typical use cases:

  • Chat channel for a one-time Live event

Conversation

Conversation channels is designed for 1-on-1 messaging and private small group chat. Unlike the other channel types, a Conversation channel can be created simply by knowing the userId of the user we want to converse with. Users can start conversations with any other user and only they will be able to see their conversation.
Each channel has its own list of members, and no two channels can have the exact same member list. If someone tries to create a new channel with the same set of members as an existing channel, the system will return the existing channel. For example creating a new channel with User A and User B will always result in the same channel no matter how many time the create command is called. This is useful when trying to establish a private chat channel between 2 or more users as we want to make sure the user can continue using the existing channel that contains previous messages history.

Channel characteristics

  • Channel is always unique with the same set of membership.
  • Support up to 10 members per conversation channel
  • Users can not join, leave, be added or removed from the channel once it's created
  • Users can not ban / unban other users in the channel
  • Does not appear on the ASC console for administrator to monitor
  • Does not support @mention user & @mention all

Typical use cases:

  • 1:1 Chat Channel
  • Private Group Chat
  • Customer Support Chat
Channel types can be created through SDK i.e Community, Live and Conversation. Creation of Private and Standard type has been removed. Creation of Broadcast channel type is not supported through the SDK. But for query, getChannels: method supports all channel types including Broadcast, Private and Standard.

Broadcast

The Broadcast channel is heavily adopted by corporate users who constantly promote or advertise their products, or make the announcement to drive awareness. Unlike other channel types, broadcast channels only allow admin users to send messages from Console, and everyone else in the channel will be under read-only mode.

Broadcast channel characteristics

  • Broadcast message can only be sent out via ASC console
  • The administrator can choose to send to any community OR live channel (but not to the conversation channel).
  • Support @mention user
  • Support @mention channel users (mention all users)
Typical use cases:
  • Marketing & Advertising
  • Organizational Announcements

Difference in Channel Types

Channel Type
Discoverable by
Message sending privileges
Moderation access
Channel Creation
Community
All members and admins
Members and admins
All Moderation tools
SDK, Console
Live
Only members and admins
Members and admins
All Moderation tools
SDK, Console
Broadcast
All members and admins
Admins
Admin Moderation tools
Console
Conversation
Only members
Members
No Moderation tools
SDK

Channel Properties

Name
Data Type
Description
channelId
String
ID of the channel
isDistinct
Bool
Is channel distinct?
metadata
JsonObject
Additional properties to support custom fields
type
AmityChannelType
Type of channel
tags
Array<String>
Tags used for searching
isMuted
Bool
Is this channel muted?
isRateLimited
Bool
This channel has limited sending rate?
rateLimit
Int
Number of messages within rate limit
displayName
String
Channel name for displaying
memberCount
Integer
Number of members in channel
messageCount
Integer
Number of messages in channel
unreadCount
Integer
Number of unread messages in channel
lastActivity
DateTime
Date/time of user's last activity related to the channel (e.g. add/remove member)
createdAt
DateTime
Date/time the channel was created
updatedAt
DateTime
Date/time the channel was last updated
avatarFileId
String
Avatar file ID
Channel Object is a Live Object and you can observe real-time changes in Channel Properties. Please see to Live Object on how to listen to real-time changes.
Last modified 1mo ago