AgoraChatSDK 1.0.7
Instance Methods | Properties | List of all members
AgoraChatMessage Class Reference
Inheritance diagram for AgoraChatMessage:

Instance Methods

(AgoraChatMessageReaction *_Nullable) - getReaction:
 
(id _Nonnull) - initWithConversationID:from:to:body:ext:
 
(id _Nonnull) - initWithConversationID:body:ext:
 

Properties

NSString *_Nonnull messageId
 
NSString *_Nonnull conversationId
 
AgoraChatMessageDirection direction
 
NSString *_Nonnull from
 
NSString *_Nonnull to
 
long long timestamp
 
long long localTime
 
AgoraChatType chatType
 
AgoraChatMessageStatus status
 
BOOL onlineState
 
BOOL isReadAcked
 
BOOL isChatThreadMessage
 
BOOL isNeedGroupAck
 
int groupAckCount
 
BOOL isDeliverAcked
 
BOOL isRead
 
BOOL isListened
 
AgoraChatMessageBody *_Nonnull body
 
NSArray< AgoraChatMessageReaction * > *_Nullable reactionList
 
NSDictionary *_Nullable ext
 
AgoraChatThread *_Nullable chatThread
 

Method Documentation

◆ getReaction:

- (AgoraChatMessageReaction *_Nullable) getReaction: (NSString *_Nonnull)  reaction

Gets the Reaction content by the Reaction ID.

Parameters
reactionThe Reaction ID.
Returns
The Reaction content.

◆ initWithConversationID:body:ext:

- (id _Nonnull) initWithConversationID: (NSString *_Nonnull)  aConversationId
body: (AgoraChatMessageBody *_Nonnull)  aBody
ext: (NSDictionary *_Nullable)  aExt 

Initializes a message instance.

Parameters
aConversationIdThe conversation ID.
aBodyThe message body.
aExtThe message extention.
Returns
The message instance.

◆ initWithConversationID:from:to:body:ext:

- (id _Nonnull) initWithConversationID: (NSString *_Nonnull)  aConversationId
from: (NSString *_Nonnull)  aFrom
to: (NSString *_Nonnull)  aTo
body: (AgoraChatMessageBody *_Nonnull)  aBody
ext: (NSDictionary *_Nullable)  aExt 

Initializes a message instance.

Parameters
aConversationIdThe conversation ID.
aFromThe user that sends the message.
aToThe user that receives the message.
aBodyThe message body.
aExtThe message extention.
Returns
The message instance.

Property Documentation

◆ body

- (AgoraChatMessageBody* _Nonnull) body
readwritenonatomicstrong

The message body.

◆ chatThread

- (AgoraChatThread* _Nullable) chatThread
readatomicassign

Get an overview of the thread in the message (currently only supported by group messages)

◆ chatType

- (AgoraChatType) chatType
readwritenonatomicassign

The chat type.

◆ conversationId

- (NSString* _Nonnull) conversationId
readwritenonatomiccopy

The conversation ID, which is the unique identifier of the conversation.

◆ direction

- (AgoraChatMessageDirection) direction
readwritenonatomicassign

The message delivery direction.

◆ ext

- (NSDictionary* _Nullable) ext
readwritenonatomiccopy

The custom message extension.

This member is in the key-value format, where the key is the extension field name of the NSString type, and the value must be of the NSString or NSNumber(Bool, Int, unsigned int, long long, double) type.

◆ from

- (NSString* _Nonnull) from
readwritenonatomiccopy

The user sending the message.

◆ groupAckCount

- (int) groupAckCount
readnonatomicassign

The number of read receipts for group messages.

◆ isChatThreadMessage

- (BOOL) isChatThreadMessage
readwritenonatomicassign

Is it a message sent within a thread

◆ isDeliverAcked

- (BOOL) isDeliverAcked
readwritenonatomicassign

For the message sender, this property indicates whether the delivery receipt is received.

- For the message sender, this property indicates whether the delivery receipt is received.
- For the message recipient, this property indicates whether the delivery receipt is sent.

If you set enableDeliveryAck in AgoraChatOptions as YES, the SDK automatically sends the delivery receipt after receiving a message.

◆ isListened

- (BOOL) isListened
readwritenonatomicassign

Whether the voice message is played.

  • Yes: Yes;
  • No: No.

◆ isNeedGroupAck

- (BOOL) isNeedGroupAck
readwritenonatomicassign

Whether read receipts are required for group messages.

  • Yes: Yes;
  • No: No.

◆ isRead

- (BOOL) isRead
readwritenonatomicassign

Whether the message is read.

  • Yes: Yes;
  • No: No.

◆ isReadAcked

- (BOOL) isReadAcked
readwritenonatomicassign

Whether the message read receipt (from the message sender) is sent or received (by the message recipient).

  • Yes: Yes;
  • No: No.

◆ localTime

- (long long) localTime
readwritenonatomicassign

The Unix timestamp for the local client sending or receiving the message.

◆ messageId

- (NSString* _Nonnull) messageId
readwritenonatomiccopy

The message ID, which is the unique identifier of the message.

◆ onlineState

- (BOOL) onlineState
readnonatomicassign

(Local database does not store. The default value for reading or pulling roaming messages from the database is YES) Message Online Status

◆ reactionList

- (NSArray<AgoraChatMessageReaction *>* _Nullable) reactionList
readnonatomicassign

The Reaction list.

◆ status

- (AgoraChatMessageStatus) status
readwritenonatomicassign

The message delivery status. See AgoraChatMessageStatus.

◆ timestamp

- (long long) timestamp
readwritenonatomicassign

The Unix timestamp for the chat server receiving the message. The unit is second.

◆ to

- (NSString* _Nonnull) to
readwritenonatomiccopy

The user receiving the message.


The documentation for this class was generated from the following file: