AgoraChatSDK 1.3.1
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) {
50 AgoraChatRoomMessagePriorityHigh = 0,
52 AgoraChatRoomMessagePriorityNormal,
54 AgoraChatRoomMessagePriorityLow,
55};
56
61@interface AgoraChatMessagePinInfo: NSObject
63@property (strong,nonatomic) NSString* _Nonnull operatorId;
65@property (nonatomic) NSInteger pinTime;
66
67@end
68
73typedef NS_ENUM(NSInteger, AgoraChatMessagePinOperation) {
75 AgoraChatMessagePin = 0,
76
78 AgoraChatMessageUnpin
79};
80
81@class AgoraChatThread;
86@interface AgoraChatMessage : NSObject
87
92@property (nonatomic, copy) NSString * _Nonnull messageId;
93
98@property (nonatomic, copy) NSString * _Nonnull conversationId;
99
104@property (nonatomic) AgoraChatMessageDirection direction;
105
110@property (nonatomic, copy) NSString * _Nonnull from;
111
116@property (nonatomic, copy) NSString * _Nonnull to;
117
124@property (nonatomic) long long timestamp;
125
132@property (nonatomic) long long localTime;
133
138@property (nonatomic) AgoraChatType chatType;
139
144@property (nonatomic) AgoraChatMessageStatus status;
145
159@property (nonatomic, readonly) BOOL onlineState;
160
168@property (nonatomic) BOOL isReadAcked;
169
177@property (nonatomic) BOOL isChatThreadMessage;
178
186@property (nonatomic) BOOL isNeedGroupAck;
187
192@property (nonatomic, readonly) int groupAckCount;
193
207@property (nonatomic) BOOL isDeliverAcked;
208
216@property (nonatomic) BOOL isRead;
217
225@property (nonatomic) BOOL isListened;
226
231@property (nonatomic, strong) AgoraChatMessageBody * _Nonnull body;
232
237@property (nonatomic, readonly) NSArray <AgoraChatMessageReaction *>* _Nullable reactionList;
238
247- (AgoraChatMessageReaction *_Nullable)getReaction:(NSString * _Nonnull)reaction;
248
255@property (nonatomic, copy) NSDictionary * _Nullable ext;
263@property (readonly) AgoraChatThread * _Nullable chatThread;
272@property (nonatomic) AgoraChatRoomMessagePriority priority;
273
279@property (nonatomic,readonly) BOOL broadcast;
280
288@property (nonatomic) BOOL deliverOnlineOnly;
289
297@property (nonatomic,strong) NSArray<NSString*>* _Nullable receiverList;
298
305@property (nonatomic,readonly) BOOL isContentReplaced;
306
314@property (nonatomic,readonly) AgoraChatMessagePinInfo* _Nullable pinnedInfo;
315
330- (instancetype _Nonnull)initWithConversationID:(NSString *_Nonnull)aConversationId
331 from:(NSString *_Nonnull)aFrom
332 to:(NSString *_Nonnull)aTo
333 body:(AgoraChatMessageBody *_Nonnull)aBody
334 ext:(NSDictionary *_Nullable)aExt;
335
348- (instancetype _Nonnull)initWithConversationID:(NSString *_Nonnull)aConversationId
349 body:(AgoraChatMessageBody *_Nonnull)aBody
350 ext:(NSDictionary *_Nullable)aExt;
351
352@end
Definition: AgoraChatMessageBody.h:33
Definition: AgoraChatMessage.h:87
Definition: AgoraChatMessage.h:62
NSInteger pinTime
Definition: AgoraChatMessage.h:65
NSString *_Nonnull operatorId
Definition: AgoraChatMessage.h:63
Definition: AgoraChatMessageReaction.h:18
Definition: AgoraChatThread.h:19