HyphenateChatSDK 4.8.0
EMChatMessage.h
1
15#import <Foundation/Foundation.h>
16
17#import "EMMessageBody.h"
18#import "EMMessageReaction.h"
19
27typedef NS_ENUM(NSInteger, EMChatType) {
28 EMChatTypeChat = 0,
29 EMChatTypeGroupChat,
30 EMChatTypeChatRoom,
31};
32
40typedef NS_ENUM(NSInteger, EMMessageStatus) {
41 EMMessageStatusPending = 0,
42 EMMessageStatusDelivering,
43 EMMessageStatusSucceed,
44 EMMessageStatusFailed,
45};
46
54typedef NS_ENUM(NSInteger, EMMessageDirection) {
55 EMMessageDirectionSend = 0,
56 EMMessageDirectionReceive,
57};
58
66typedef NS_ENUM(NSInteger, EMChatRoomMessagePriority) {
68 EMChatRoomMessagePriorityHigh = 0,
70 EMChatRoomMessagePriorityNormal,
72 EMChatRoomMessagePriorityLow,
73};
74
82@interface EMMessagePinInfo: NSObject
84@property (strong,nonatomic) NSString* _Nonnull operatorId;
86@property (nonatomic) NSInteger pinTime;
87
88@end
89
97typedef NS_ENUM(NSInteger, EMMessagePinOperation) {
99 EMMessagePin = 0,
100
102 EMMessageUnpin
103};
104
105@class EMChatThread;
113@interface EMChatMessage : NSObject
114
122@property (nonatomic, copy) NSString * _Nonnull messageId;
123
131@property (nonatomic, copy) NSString * _Nonnull conversationId;
132
140@property (nonatomic) EMMessageDirection direction;
141
149@property (nonatomic, copy) NSString * _Nonnull from;
150
158@property (nonatomic, copy) NSString * _Nonnull to;
159
169@property (nonatomic) long long timestamp;
170
182@property (nonatomic) long long localTime;
183
191@property (nonatomic) EMChatType chatType;
192
200@property (nonatomic) EMMessageStatus status;
201
225@property (nonatomic, readonly) BOOL onlineState;
226
240@property (nonatomic) BOOL isReadAcked;
241
255@property (nonatomic) BOOL isChatThreadMessage;
256
270@property (nonatomic) BOOL isNeedGroupAck;
271
279@property (nonatomic, readonly) int groupAckCount;
280
306@property (nonatomic) BOOL isDeliverAcked;
307
321@property (nonatomic) BOOL isRead;
322
336@property (nonatomic) BOOL isListened;
337
345@property (nonatomic, strong) EMMessageBody * _Nonnull body;
346
354@property (nonatomic, readonly) NSArray <EMMessageReaction *>* _Nullable reactionList;
355
371- (EMMessageReaction *_Nullable)getReaction:(NSString * _Nonnull)reaction;
372
384@property (nonatomic, copy) NSDictionary * _Nullable ext;
397@property (readonly) EMChatThread * _Nullable chatThread;
412@property (nonatomic) EMChatRoomMessagePriority priority;
413
424@property (nonatomic,readonly) BOOL broadcast;
425
440@property (nonatomic) BOOL deliverOnlineOnly;
441
455@property (nonatomic,strong) NSArray<NSString*>* _Nullable receiverList;
456
467@property (nonatomic,readonly) BOOL isContentReplaced;
468
483@property (nonatomic,readonly) EMMessagePinInfo* _Nullable pinnedInfo;
484
510- (instancetype _Nonnull)initWithConversationID:(NSString *_Nonnull)aConversationId
511 from:(NSString *_Nonnull)aFrom
512 to:(NSString *_Nonnull)aTo
513 body:(EMMessageBody *_Nonnull)aBody
514 ext:(NSDictionary *_Nullable)aExt;
515
537- (instancetype _Nonnull)initWithConversationID:(NSString *_Nonnull)aConversationId
538 body:(EMMessageBody *_Nonnull)aBody
539 ext:(NSDictionary *_Nullable)aExt;
540
541@end
Definition: EMChatMessage.h:114
Definition: EMChatThread.h:22
Definition: EMMessageBody.h:46
Definition: EMChatMessage.h:83
NSString *_Nonnull operatorId
Definition: EMChatMessage.h:84
NSInteger pinTime
Definition: EMChatMessage.h:86
Definition: EMMessageReaction.h:21