Chat SDK for Unity and Windows v1.2.1
Public Member Functions | List of all members
AgoraChat.IChatManagerDelegate Interface Reference

Public Member Functions

void OnMessagesReceived (List< Message > messages)
 
void OnCmdMessagesReceived (List< Message > messages)
 
void OnMessagesRead (List< Message > messages)
 
void OnMessagesDelivered (List< Message > messages)
 
void OnMessagesRecalled (List< Message > messages)
 
void OnReadAckForGroupMessageUpdated ()
 
void OnGroupMessageRead (List< GroupReadAck > list)
 
void OnConversationsUpdate ()
 
void OnConversationRead (string from, string to)
 
void MessageReactionDidChange (List< MessageReactionChange > list)
 
void OnMessageContentChanged (Message msg, string operatorId, long operationTime)
 

Detailed Description

The chat manager callback interface.

Member Function Documentation

◆ OnMessagesReceived()

void AgoraChat.IChatManagerDelegate.OnMessagesReceived ( List< Message messages)

Occurs when a messages is received.

This callback is triggered to notify the user when a message such as a text, image, video, voice, geographical location, or file is received.

Parameters
messagesThe received message(s).

◆ OnCmdMessagesReceived()

void AgoraChat.IChatManagerDelegate.OnCmdMessagesReceived ( List< Message messages)

Occurs when a command message is received.

Unlike onMessageReceived(List), this callback is triggered only by the reception of a command message that is usually invisible to users.

Parameters
messagesThe received command message(s).

◆ OnMessagesRead()

void AgoraChat.IChatManagerDelegate.OnMessagesRead ( List< Message messages)

Occurs when a read receipt is received for a message.

Parameters
messagesThe read message(s).

◆ OnMessagesDelivered()

void AgoraChat.IChatManagerDelegate.OnMessagesDelivered ( List< Message messages)

Occurs when a delivery receipt is received.

Parameters
messagesThe delivered message(s).

◆ OnMessagesRecalled()

void AgoraChat.IChatManagerDelegate.OnMessagesRecalled ( List< Message messages)

Occurs when a received message is recalled.

Parameters
messagesThe recalled message(s).

◆ OnReadAckForGroupMessageUpdated()

void AgoraChat.IChatManagerDelegate.OnReadAckForGroupMessageUpdated ( )

Occurs when the read status updates of a group message is received.

◆ OnGroupMessageRead()

void AgoraChat.IChatManagerDelegate.OnGroupMessageRead ( List< GroupReadAck list)

Occurs when a read receipt is received for a group message.

Parameters
listThe read receipt(s) for group message(s).

◆ OnConversationsUpdate()

void AgoraChat.IChatManagerDelegate.OnConversationsUpdate ( )

Occurs when the number of conversations changes.

◆ OnConversationRead()

void AgoraChat.IChatManagerDelegate.OnConversationRead ( string  from,
string  to 
)

Occurs when the read receipt is received for a conversation.

This callback occurs in either of the following scenarios:

  • The message is read by the recipient (The read receipt for the conversation is sent).

    Upon receiving this event, the SDK sets the isAcked attribute of the messages in the conversation to true in the local database.

  • In the multi-device login scenario, when one device sends a read receipt for a conversation, the server will set the number of unread messages of this conversation to 0. In this case, the callback occurs on the other devices where the SDK will set isRead attribute of the messages in the conversation to true in the local database.
Parameters
fromThe ID of the user who sends the read receipt.
toThe ID of the user who receives the read receipt.

◆ MessageReactionDidChange()

void AgoraChat.IChatManagerDelegate.MessageReactionDidChange ( List< MessageReactionChange list)

Occurs when the reactions changed.

Parameters
listThe changed reaction list.

◆ OnMessageContentChanged()

void AgoraChat.IChatManagerDelegate.OnMessageContentChanged ( Message  msg,
string  operatorId,
long  operationTime 
)

Occurs when a sent message is modified.

Parameters
MessageThe modified message object, where the message body contains the information such as the number of message modifications, the operator of the last modification, and the last modification time. Also, you can get the operator of the last message modification and the last modification time via the onMessageContentChanged method.
operatorIdThe user ID of the operator that modified the message last time.
operationTimeThe last message modification time. It is a UNIX timestamp in milliseconds.