HyphenateChatSDK 3.9.9.1
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) {
67 EMChatRoomMessagePriorityHigh = 0, /* \~chinese 高。 \~english High. */
68 EMChatRoomMessagePriorityNormal, /* \~chinese 中。 \~english Normal. */
69 EMChatRoomMessagePriorityLow, /* \~chinese 低。 \~english Lower. */
70};
71
72
73@class EMChatThread;
81@interface EMChatMessage : NSObject
82
90@property (nonatomic, copy) NSString * _Nonnull messageId;
91
99@property (nonatomic, copy) NSString * _Nonnull conversationId;
100
108@property (nonatomic) EMMessageDirection direction;
109
117@property (nonatomic, copy) NSString * _Nonnull from;
118
126@property (nonatomic, copy) NSString * _Nonnull to;
127
135@property (nonatomic) long long timestamp;
136
144@property (nonatomic) long long localTime;
145
153@property (nonatomic) EMChatType chatType;
154
162@property (nonatomic) EMMessageStatus status;
163
171@property (nonatomic, readonly) BOOL onlineState;
172
186@property (nonatomic) BOOL isReadAcked;
187
195@property (nonatomic) BOOL isChatThreadMessage;
196
197
198@property (nonatomic) BOOL isChannelMessage;
199
213@property (nonatomic) BOOL isNeedGroupAck;
214
222@property (nonatomic, readonly) int groupAckCount;
223
241@property (nonatomic) BOOL isDeliverAcked;
242
256@property (nonatomic) BOOL isRead;
257
271@property (nonatomic) BOOL isListened;
272
280@property (nonatomic, strong) EMMessageBody * _Nonnull body;
281
289@property (nonatomic, readonly) NSArray <EMMessageReaction *>* _Nullable reactionList;
290
306- (EMMessageReaction *_Nullable)getReaction:(NSString * _Nonnull)reaction;
307
319@property (nonatomic, copy) NSDictionary * _Nullable ext;
328@property (readonly) EMChatThread * _Nullable chatThread;
336@property (nonatomic) EMChatRoomMessagePriority priority;
337
363- (id _Nonnull )initWithConversationID:(NSString *_Nonnull)aConversationId
364 from:(NSString *_Nonnull)aFrom
365 to:(NSString *_Nonnull)aTo
366 body:(EMMessageBody *_Nonnull)aBody
367 ext:(NSDictionary *_Nullable)aExt;
368
390- (id _Nonnull )initWithConversationID:(NSString *_Nonnull)aConversationId
391 body:(EMMessageBody *_Nonnull)aBody
392 ext:(NSDictionary *_Nullable)aExt;
393
394@end
Definition: EMChatMessage.h:82
NSArray< EMMessageReaction * > *_Nullable reactionList
Definition: EMChatMessage.h:289
BOOL isReadAcked
Definition: EMChatMessage.h:186
BOOL isNeedGroupAck
Definition: EMChatMessage.h:213
NSDictionary *_Nullable ext
Definition: EMChatMessage.h:319
NSString *_Nonnull conversationId
Definition: EMChatMessage.h:99
BOOL isChatThreadMessage
Definition: EMChatMessage.h:195
NSString *_Nonnull from
Definition: EMChatMessage.h:117
BOOL onlineState
Definition: EMChatMessage.h:171
BOOL isDeliverAcked
Definition: EMChatMessage.h:241
NSString *_Nonnull messageId
Definition: EMChatMessage.h:90
long long localTime
Definition: EMChatMessage.h:144
EMChatThread *_Nullable chatThread
Definition: EMChatMessage.h:328
BOOL isRead
Definition: EMChatMessage.h:256
int groupAckCount
Definition: EMChatMessage.h:222
EMMessageStatus status
Definition: EMChatMessage.h:162
NSString *_Nonnull to
Definition: EMChatMessage.h:126
long long timestamp
Definition: EMChatMessage.h:135
EMMessageDirection direction
Definition: EMChatMessage.h:108
BOOL isListened
Definition: EMChatMessage.h:271
EMChatType chatType
Definition: EMChatMessage.h:153
EMChatRoomMessagePriority priority
Definition: EMChatMessage.h:336
EMMessageBody *_Nonnull body
Definition: EMChatMessage.h:280
Definition: EMChatThread.h:22
Definition: EMMessageBody.h:45
Definition: EMMessageReaction.h:21