AgoraChatSDK 1.2.0
AgoraChatMessage.h
1
9#import <Foundation/Foundation.h>
10
11#import "AgoraChatMessageBody.h"
12#import "AgoraChatMessageReaction.h"
13
18typedef NS_ENUM(NSInteger, AgoraChatType) {
19 AgoraChatTypeChat = 0,
20 AgoraChatTypeGroupChat,
21 AgoraChatTypeChatRoom,
22};
23
28typedef NS_ENUM(NSInteger, AgoraChatMessageStatus) {
29 AgoraChatMessageStatusPending = 0,
30 AgoraChatMessageStatusDelivering,
31 AgoraChatMessageStatusSucceed,
32 AgoraChatMessageStatusFailed,
33};
34
39typedef NS_ENUM(NSInteger, AgoraChatMessageDirection) {
40 AgoraChatMessageDirectionSend = 0,
41 AgoraChatMessageDirectionReceive,
42};
43
48typedef NS_ENUM(NSInteger, AgoraChatRoomMessagePriority) {
49 AgoraChatRoomMessagePriorityHigh = 0, /* High. */
50 AgoraChatRoomMessagePriorityNormal, /* Normal. */
51 AgoraChatRoomMessagePriorityLow, /* Low. */
52};
53
54
55@class AgoraChatThread;
60@interface AgoraChatMessage : NSObject
61
66@property (nonatomic, copy) NSString * _Nonnull messageId;
67
72@property (nonatomic, copy) NSString * _Nonnull conversationId;
73
78@property (nonatomic) AgoraChatMessageDirection direction;
79
84@property (nonatomic, copy) NSString * _Nonnull from;
85
90@property (nonatomic, copy) NSString * _Nonnull to;
91
98@property (nonatomic) long long timestamp;
99
106@property (nonatomic) long long localTime;
107
112@property (nonatomic) AgoraChatType chatType;
113
118@property (nonatomic) AgoraChatMessageStatus status;
119
133@property (nonatomic, readonly) BOOL onlineState;
134
142@property (nonatomic) BOOL isReadAcked;
143
151@property (nonatomic) BOOL isChatThreadMessage;
152
160@property (nonatomic) BOOL isNeedGroupAck;
161
166@property (nonatomic, readonly) int groupAckCount;
167
181@property (nonatomic) BOOL isDeliverAcked;
182
190@property (nonatomic) BOOL isRead;
191
199@property (nonatomic) BOOL isListened;
200
205@property (nonatomic, strong) AgoraChatMessageBody * _Nonnull body;
206
211@property (nonatomic, readonly) NSArray <AgoraChatMessageReaction *>* _Nullable reactionList;
212
221- (AgoraChatMessageReaction *_Nullable)getReaction:(NSString * _Nonnull)reaction;
222
229@property (nonatomic, copy) NSDictionary * _Nullable ext;
237@property (readonly) AgoraChatThread * _Nullable chatThread;
246@property (nonatomic) AgoraChatRoomMessagePriority priority;
254@property (nonatomic) BOOL deliverOnlineOnly;
255
263@property (nonatomic,strong) NSArray<NSString*>* _Nullable receiverList;
264
279- (instancetype _Nonnull)initWithConversationID:(NSString *_Nonnull)aConversationId
280 from:(NSString *_Nonnull)aFrom
281 to:(NSString *_Nonnull)aTo
282 body:(AgoraChatMessageBody *_Nonnull)aBody
283 ext:(NSDictionary *_Nullable)aExt;
284
297- (instancetype _Nonnull)initWithConversationID:(NSString *_Nonnull)aConversationId
298 body:(AgoraChatMessageBody *_Nonnull)aBody
299 ext:(NSDictionary *_Nullable)aExt;
300
301@end
Definition: AgoraChatMessageBody.h:33
Definition: AgoraChatMessage.h:61
BOOL isReadAcked
Definition: AgoraChatMessage.h:142
AgoraChatMessageStatus status
Definition: AgoraChatMessage.h:118
NSArray< AgoraChatMessageReaction * > *_Nullable reactionList
Definition: AgoraChatMessage.h:211
NSString *_Nonnull from
Definition: AgoraChatMessage.h:84
AgoraChatMessageBody *_Nonnull body
Definition: AgoraChatMessage.h:205
int groupAckCount
Definition: AgoraChatMessage.h:166
AgoraChatThread *_Nullable chatThread
Definition: AgoraChatMessage.h:237
AgoraChatMessageDirection direction
Definition: AgoraChatMessage.h:78
long long timestamp
Definition: AgoraChatMessage.h:98
NSString *_Nonnull to
Definition: AgoraChatMessage.h:90
NSString *_Nonnull messageId
Definition: AgoraChatMessage.h:66
NSDictionary *_Nullable ext
Definition: AgoraChatMessage.h:229
BOOL deliverOnlineOnly
Definition: AgoraChatMessage.h:254
NSArray< NSString * > *_Nullable receiverList
Definition: AgoraChatMessage.h:263
AgoraChatType chatType
Definition: AgoraChatMessage.h:112
long long localTime
Definition: AgoraChatMessage.h:106
BOOL isChatThreadMessage
Definition: AgoraChatMessage.h:151
BOOL isRead
Definition: AgoraChatMessage.h:190
BOOL isNeedGroupAck
Definition: AgoraChatMessage.h:160
BOOL isListened
Definition: AgoraChatMessage.h:199
NSString *_Nonnull conversationId
Definition: AgoraChatMessage.h:72
BOOL onlineState
Definition: AgoraChatMessage.h:133
AgoraChatRoomMessagePriority priority
Definition: AgoraChatMessage.h:246
BOOL isDeliverAcked
Definition: AgoraChatMessage.h:181
Definition: AgoraChatMessageReaction.h:18
Definition: AgoraChatThread.h:19