9#import <Foundation/Foundation.h>
11#import "AgoraChatMessageBody.h"
12#import "AgoraChatCursorResult.h"
13#import "AgoraChatSilentModeParam.h"
19typedef NS_ENUM(NSInteger, AgoraChatConversationType) {
20 AgoraChatConversationTypeChat = 0,
21 AgoraChatConversationTypeGroupChat,
22 AgoraChatConversationTypeChatRoom,
31typedef NS_ENUM(NSInteger, AgoraChatMarkType) {
32 AgoraChatMarkType0 = 0,
33 AgoraChatMarkType1 = 1,
34 AgoraChatMarkType2 = 2,
35 AgoraChatMarkType3 = 3,
36 AgoraChatMarkType4 = 4,
37 AgoraChatMarkType5 = 5,
38 AgoraChatMarkType6 = 6,
39 AgoraChatMarkType7 = 7,
40 AgoraChatMarkType8 = 8,
41 AgoraChatMarkType9 = 9,
42 AgoraChatMarkType10 = 10,
43 AgoraChatMarkType11 = 11,
44 AgoraChatMarkType12 = 12,
45 AgoraChatMarkType13 = 13,
46 AgoraChatMarkType14 = 14,
47 AgoraChatMarkType15 = 15,
48 AgoraChatMarkType16 = 16,
49 AgoraChatMarkType17 = 17,
50 AgoraChatMarkType18 = 18,
51 AgoraChatMarkType19 = 19,
64typedef NS_ENUM(NSInteger, AgoraChatMessageSearchDirection) {
65 AgoraChatMessageSearchDirectionUp = 0,
66 AgoraChatMessageSearchDirectionDown
73typedef NS_ENUM(NSInteger, AgoraChatMessageSearchScope) {
74 AgoraChatMessageSearchScopeContent = 0,
75 AgoraChatMessageSearchScopeExt,
76 AgoraChatMessageSearchScopeAll
101@property (nonatomic, assign, readonly) AgoraChatConversationType
type;
121@property (nonatomic, copy) NSDictionary *
ext;
155@property (nonatomic, readonly) NSArray<NSNumber*>*
marks;
161@property (nonatomic, readonly) AgoraChatPushRemindType
disturbType;
209- (void)deleteMessageWithId:(NSString *_Nonnull)aMessageId
231- (void)removeMessagesFromServerMessageIds:(NSArray <__kindof NSString*>*_Nonnull)messageIds completion:(
void (^ _Nullable)(
AgoraChatError * _Nullable aError))aCompletionBlock;
242- (void)removeMessagesFromServerWithTimeStamp:(NSTimeInterval)beforeTimeStamp completion:(
void (^ _Nullable)(
AgoraChatError * _Nullable aError))aCompletionBlock;
265- (void)markMessageAsReadWithId:(NSString *_Nonnull)aMessageId
284#pragma mark - Load Messages Methods
294- (
AgoraChatMessage * _Nullable)loadMessageWithId:(NSString * _Nonnull)aMessageId
313- (NSArray<
AgoraChatMessage *> * _Nullable)loadMessagesStartFromId:(NSString * _Nullable)aMessageId
315 searchDirection:(AgoraChatMessageSearchDirection)aDirection;
332- (void)loadMessagesStartFromId:(NSString * _Nullable)aMessageId
334 searchDirection:(AgoraChatMessageSearchDirection)aDirection
352- (NSArray<
AgoraChatMessage *> * _Nullable)loadMessagesWithType:(AgoraChatMessageBodyType)aType
353 timestamp:(
long long)aTimestamp
355 fromUser:(NSString* _Nullable)aUsername
356 searchDirection:(AgoraChatMessageSearchDirection)aDirection;
370- (void)loadMessagesWithType:(AgoraChatMessageBodyType)aType
371 timestamp:(
long long)aTimestamp
373 fromUser:(NSString* _Nullable)aUsername
374 searchDirection:(AgoraChatMessageSearchDirection)aDirection
388- (void)searchMessagesWithTypes:(NSArray <NSNumber*> *_Nonnull)aTypes
389 timestamp:(
long long)aTimestamp
391 fromUser:(NSString* _Nullable)aUsername
392 searchDirection:(AgoraChatMessageSearchDirection)aDirection
410- (NSArray<
AgoraChatMessage *> * _Nullable)loadMessagesWithKeyword:(NSString* _Nullable)aKeyword
411 timestamp:(
long long)aTimestamp
413 fromUser:(NSString* _Nullable)aSender
414 searchDirection:(AgoraChatMessageSearchDirection)aDirection;
429- (void)loadMessagesWithKeyword:(NSString* _Nullable)aKeyword
430 timestamp:(
long long)aTimestamp
432 fromUser:(NSString* _Nullable)aSender
433 searchDirection:(AgoraChatMessageSearchDirection)aDirection
454- (void)loadMessagesWithKeyword:(NSString* _Nullable)aKeyword
455 timestamp:(
long long)aTimestamp
457 fromUser:(NSString* _Nullable)aSender
458 searchDirection:(AgoraChatMessageSearchDirection)aDirection
459 scope:(AgoraChatMessageSearchScope)aScope
477- (NSArray<
AgoraChatMessage *> * _Nullable)loadCustomMsgWithKeyword:(NSString*)aKeyword
478 timestamp:(
long long)aTimestamp
480 fromUser:(NSString* _Nullable)aSender
481 searchDirection:(AgoraChatMessageSearchDirection)aDirection;
496- (void)loadCustomMsgWithKeyword:(NSString* _Nullable)aKeyword
497 timestamp:(
long long)aTimestamp
499 fromUser:(NSString* _Nullable)aSender
500 searchDirection:(AgoraChatMessageSearchDirection)aDirection
518- (NSArray<
AgoraChatMessage *> * _Nullable)loadMessagesFrom:(
long long)aStartTimestamp
519 to:(
long long)aEndTimestamp
532- (void)loadMessagesFrom:(
long long)aStartTimestamp
533 to:(
long long)aEndTimestamp
548- (
AgoraChatError* _Nullable)removeMessagesStart:(NSInteger)aStartTimestamp
549 to:(NSInteger)aEndTimestamp;
559- (NSInteger)getMessageCountStart:(NSInteger)aStartTimestamp
560 to:(NSInteger)aEndTimestamp;
Definition: AgoraChatConversation.h:87
BOOL isPinned
Definition: AgoraChatConversation.h:137
BOOL isChatThread
Definition: AgoraChatConversation.h:129
AgoraChatMessage *_Nullable lastReceivedMessage()
NSString * conversationId
Definition: AgoraChatConversation.h:95
AgoraChatMessage * latestMessage
Definition: AgoraChatConversation.h:149
int64_t pinnedTime
Definition: AgoraChatConversation.h:143
int unreadMessagesCount
Definition: AgoraChatConversation.h:107
int messagesCount
Definition: AgoraChatConversation.h:113
AgoraChatPushRemindType disturbType
Definition: AgoraChatConversation.h:161
NSArray< NSNumber * > * marks
Definition: AgoraChatConversation.h:155
NSDictionary * ext
Definition: AgoraChatConversation.h:121
NSArray< AgoraChatMessage * > *_Nullable pinnedMessages()
AgoraChatConversationType type
Definition: AgoraChatConversation.h:101
Definition: AgoraChatError.h:18
Definition: AgoraChatMessage.h:87