9#import <Foundation/Foundation.h>
11#import "AgoraChatMessageBody.h"
12#import "AgoraChatCursorResult.h"
18typedef NS_ENUM(NSInteger, AgoraChatConversationType) {
19 AgoraChatConversationTypeChat = 0,
20 AgoraChatConversationTypeGroupChat,
21 AgoraChatConversationTypeChatRoom,
34typedef NS_ENUM(NSInteger, AgoraChatMessageSearchDirection) {
35 AgoraChatMessageSearchDirectionUp = 0,
36 AgoraChatMessageSearchDirectionDown
61@property (nonatomic, assign, readonly) AgoraChatConversationType
type;
81@property (nonatomic, copy) NSDictionary *
ext;
157- (void)deleteMessageWithId:(NSString *_Nonnull)aMessageId
179- (void)removeMessagesFromServerMessageIds:(NSArray <__kindof NSString*>*_Nonnull)messageIds completion:(
void (^ _Nullable)(
AgoraChatError * _Nullable aError))aCompletionBlock;
190- (void)removeMessagesFromServerWithTimeStamp:(NSTimeInterval)beforeTimeStamp completion:(
void (^ _Nullable)(
AgoraChatError * _Nullable aError))aCompletionBlock;
213- (void)markMessageAsReadWithId:(NSString *_Nonnull)aMessageId
226#pragma mark - Load Messages Methods
236- (
AgoraChatMessage * _Nullable)loadMessageWithId:(NSString * _Nonnull)aMessageId
255- (NSArray<
AgoraChatMessage *> * _Nullable)loadMessagesStartFromId:(NSString * _Nullable)aMessageId
257 searchDirection:(AgoraChatMessageSearchDirection)aDirection;
274- (void)loadMessagesStartFromId:(NSString * _Nullable)aMessageId
276 searchDirection:(AgoraChatMessageSearchDirection)aDirection
294- (NSArray<
AgoraChatMessage *> * _Nullable)loadMessagesWithType:(AgoraChatMessageBodyType)aType
295 timestamp:(
long long)aTimestamp
297 fromUser:(NSString* _Nullable)aUsername
298 searchDirection:(AgoraChatMessageSearchDirection)aDirection;
312- (void)loadMessagesWithType:(AgoraChatMessageBodyType)aType
313 timestamp:(
long long)aTimestamp
315 fromUser:(NSString* _Nullable)aUsername
316 searchDirection:(AgoraChatMessageSearchDirection)aDirection
335- (NSArray<
AgoraChatMessage *> * _Nullable)loadMessagesWithKeyword:(NSString* _Nullable)aKeyword
336 timestamp:(
long long)aTimestamp
338 fromUser:(NSString* _Nullable)aSender
339 searchDirection:(AgoraChatMessageSearchDirection)aDirection;
354- (void)loadMessagesWithKeyword:(NSString* _Nullable)aKeyword
355 timestamp:(
long long)aTimestamp
357 fromUser:(NSString* _Nullable)aSender
358 searchDirection:(AgoraChatMessageSearchDirection)aDirection
376- (NSArray<
AgoraChatMessage *> * _Nullable)loadCustomMsgWithKeyword:(NSString*)aKeyword
377 timestamp:(
long long)aTimestamp
379 fromUser:(NSString* _Nullable)aSender
380 searchDirection:(AgoraChatMessageSearchDirection)aDirection;
395- (void)loadCustomMsgWithKeyword:(NSString* _Nullable)aKeyword
396 timestamp:(
long long)aTimestamp
398 fromUser:(NSString* _Nullable)aSender
399 searchDirection:(AgoraChatMessageSearchDirection)aDirection
417- (NSArray<
AgoraChatMessage *> * _Nullable)loadMessagesFrom:(
long long)aStartTimestamp
418 to:(
long long)aEndTimestamp
431- (void)loadMessagesFrom:(
long long)aStartTimestamp
432 to:(
long long)aEndTimestamp
447- (
AgoraChatError* _Nullable)removeMessagesStart:(NSInteger)aStartTimestamp
448 to:(NSInteger)aEndTimestamp;
Definition: AgoraChatConversation.h:47
BOOL isPinned
Definition: AgoraChatConversation.h:97
BOOL isChatThread
Definition: AgoraChatConversation.h:89
AgoraChatMessage *_Nullable lastReceivedMessage()
NSString * conversationId
Definition: AgoraChatConversation.h:55
AgoraChatMessage * latestMessage
Definition: AgoraChatConversation.h:109
int64_t pinnedTime
Definition: AgoraChatConversation.h:103
int unreadMessagesCount
Definition: AgoraChatConversation.h:67
int messagesCount
Definition: AgoraChatConversation.h:73
NSDictionary * ext
Definition: AgoraChatConversation.h:81
AgoraChatConversationType type
Definition: AgoraChatConversation.h:61
Definition: AgoraChatError.h:18
Definition: AgoraChatMessage.h:61