
- Message
- Custom
- Action
- Call
message
can be classified into either 1 of the below types:
- text - A plain text message
- image- An image message
- video- A video message
- audio- An audio message
- file- A file message
Custom
In the case of messages that belong to thecustom
category, there are no predefined types. Custom messages can be used by developers to send messages that do not fit in the default category and types provided by CometChat. For messages with the category custom
, the developers can set their own type to uniquely identify the custom message. A very good example of a custom message would be the sharing of location co-ordinates. In this case, the developer can decide to use the custom message with type set to location
.
Action
Action messages are system-generated messages. Messages belonging to theaction
category can further be classified into one of the below types:
- groupMember - action performed on a group member.
- message - action performed on a message.
action
which actually determine the action that has been performed For the type groupMember
the action can be either one of the below:
- joined - when a group member joins a group
- left - when a group member leaves a group
- kicked - when a group member is kicked from the group
- banned - when a group member is banned from the group
- unbanned - when a group member is unbanned from the group
- added - when a user is added to the group
- scopeChanged - When the scope of a group member is changed.
message
, the action can be either one of the below:
- edited - when a message is edited.
- deleted - when a message is deleted.
Call
Messages with the categorycall
are Calling related messages. These can belong to either one of the 2 types
- audio
- video
- initiated - when a is initiated to a user/group
- ongoing - when the receiver of the call has accepted the call
- canceled - when the call has been canceled by the initiator of the call
- rejected - when the call has been rejected by the receiver of the call
- unanswered - when the call was not answered by the receiver.
- busy - when the receiver of the call was busy on another call.
- ended - when the call was successfully completed and ended by either the initiator or receiver.