HyphenateChatSDK 4.2.3
EMChatMessage.h
1
15#import <Foundation/Foundation.h>
16
17#import "EMMessageBody.h"
18
26typedef NS_ENUM(NSInteger, EMChatType) {
27 EMChatTypeChat = 0,
28 EMChatTypeGroupChat,
29 EMChatTypeChatRoom,
30};
31
39typedef NS_ENUM(NSInteger, EMMessageStatus) {
40 EMMessageStatusPending = 0,
41 EMMessageStatusDelivering,
42 EMMessageStatusSucceed,
43 EMMessageStatusFailed,
44};
45
53typedef NS_ENUM(NSInteger, EMMessageDirection) {
54 EMMessageDirectionSend = 0,
55 EMMessageDirectionReceive,
56};
57
65typedef NS_ENUM(NSInteger, EMChatRoomMessagePriority) {
66 EMChatRoomMessagePriorityHigh = 0, /* \~chinese 高。 \~english High. */
67 EMChatRoomMessagePriorityNormal, /* \~chinese 中。 \~english Normal. */
68 EMChatRoomMessagePriorityLow, /* \~chinese 低。 \~english Low. */
69};
70
78@interface EMChatMessage : NSObject
79
87@property (nonatomic, copy) NSString * _Nonnull messageId;
88
96@property (nonatomic, copy) NSString * _Nonnull conversationId;
97
105@property (nonatomic) EMMessageDirection direction;
106
114@property (nonatomic, copy) NSString * _Nonnull from;
115
123@property (nonatomic, copy) NSString * _Nonnull to;
124
134@property (nonatomic) long long timestamp;
135
147@property (nonatomic) long long localTime;
148
156@property (nonatomic) EMChatType chatType;
157
165@property (nonatomic) EMMessageStatus status;
166
190@property (nonatomic, readonly) BOOL onlineState;
191
205@property (nonatomic) BOOL isReadAcked;
206
220@property (nonatomic) BOOL isChatThreadMessage;
221
235@property (nonatomic) BOOL isNeedGroupAck;
236
244@property (nonatomic, readonly) int groupAckCount;
245
271@property (nonatomic) BOOL isDeliverAcked;
272
286@property (nonatomic) BOOL isRead;
287
301@property (nonatomic) BOOL isListened;
302
310@property (nonatomic, strong) EMMessageBody * _Nonnull body;
311
323@property (nonatomic, copy) NSDictionary * _Nullable ext;
324
339@property (nonatomic) EMChatRoomMessagePriority priority;
340
341@property (nonatomic,readonly) BOOL broadcast;
356@property (nonatomic) BOOL deliverOnlineOnly;
357
371@property (nonatomic,strong) NSArray<NSString*>* _Nullable receiverList;
372
398- (instancetype _Nonnull)initWithConversationID:(NSString *_Nonnull)aConversationId
399 from:(NSString *_Nonnull)aFrom
400 to:(NSString *_Nonnull)aTo
401 body:(EMMessageBody *_Nonnull)aBody
402 ext:(NSDictionary *_Nullable)aExt;
403
425- (instancetype _Nonnull)initWithConversationID:(NSString *_Nonnull)aConversationId
426 body:(EMMessageBody *_Nonnull)aBody
427 ext:(NSDictionary *_Nullable)aExt;
428
429@end
Definition: EMChatMessage.h:79
BOOL isReadAcked
Definition: EMChatMessage.h:205
BOOL isNeedGroupAck
Definition: EMChatMessage.h:235
NSDictionary *_Nullable ext
Definition: EMChatMessage.h:323
NSString *_Nonnull conversationId
Definition: EMChatMessage.h:96
BOOL isChatThreadMessage
Definition: EMChatMessage.h:220
NSString *_Nonnull from
Definition: EMChatMessage.h:114
BOOL deliverOnlineOnly
Definition: EMChatMessage.h:356
BOOL onlineState
Definition: EMChatMessage.h:190
BOOL isDeliverAcked
Definition: EMChatMessage.h:271
NSString *_Nonnull messageId
Definition: EMChatMessage.h:87
long long localTime
Definition: EMChatMessage.h:147
BOOL isRead
Definition: EMChatMessage.h:286
int groupAckCount
Definition: EMChatMessage.h:244
EMMessageStatus status
Definition: EMChatMessage.h:165
NSString *_Nonnull to
Definition: EMChatMessage.h:123
long long timestamp
Definition: EMChatMessage.h:134
EMMessageDirection direction
Definition: EMChatMessage.h:105
BOOL isListened
Definition: EMChatMessage.h:301
EMChatType chatType
Definition: EMChatMessage.h:156
EMChatRoomMessagePriority priority
Definition: EMChatMessage.h:339
EMMessageBody *_Nonnull body
Definition: EMChatMessage.h:310
NSArray< NSString * > *_Nullable receiverList
Definition: EMChatMessage.h:371
Definition: EMMessageBody.h:46