AgoraChatSDK 1.3.1
Instance Methods | List of all members
<IAgoraChatThreadManager> Protocol Reference
Inheritance diagram for <IAgoraChatThreadManager>:

Instance Methods

(void) - addDelegate:delegateQueue:
 
(void) - removeDelegate:
 
(void) - getChatThreadFromSever:completion:
 
(void) - getJoinedChatThreadsFromServerWithCursor:pageSize:completion:
 
(void) - getChatThreadsFromServerWithParentId:cursor:pageSize:completion:
 
(void) - getJoinedChatThreadsFromServerWithParentId:cursor:pageSize:completion:
 
(void) - getChatThreadMemberListFromServerWithId:cursor:pageSize:completion:
 
(void) - getLastMessageFromSeverWithChatThreads:completion:
 
(void) - removeMemberFromChatThread:threadId:completion:
 
(void) - updateChatThreadName:threadId:completion:
 
(void) - createChatThread:messageId:parentId:completion:
 
(void) - joinChatThread:completion:
 
(void) - leaveChatThread:completion:
 
(void) - destroyChatThread:completion:
 

Method Documentation

◆ addDelegate:delegateQueue:

- (void) addDelegate: (id< AgoraChatThreadManagerDelegate >)  aDelegate
delegateQueue: (_Nullable dispatch_queue_t)  aQueue 
required

Add delegate

Parameters
aDelegateDelegate is kindof protocol AgoraChatThreadManagerDelegate
aQueue(optional) The queue of calling delegate methods. Pass in nil to run on main thread.

◆ createChatThread:messageId:parentId:completion:

- (void) createChatThread: (NSString *)  threadName
messageId: (NSString *)  messageId
parentId: (NSString *)  parentId
completion: (void(^)(AgoraChatThread *_Nullable thread, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Create a subsection

Parameters
threadNameThe id of the subarea to get(limit 64 character)
messageIdThe message id of the operation to create the sub-area
parentIdThe session id where the message of the operation creates the sub-area is also the to of that message
completionReturns the callback, containing an AgoraChatThread object and an AgoraChatError error object

◆ destroyChatThread:completion:

- (void) destroyChatThread: (NSString *)  athreadId
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

destroy a subsection

Parameters
threadIdThe id of the subzone to destroy
aCompletionBlockreturn callback, success or failure

◆ getChatThreadFromSever:completion:

- (void) getChatThreadFromSever: (NSString *)  threadId
completion: (void(^)(AgoraChatThread *_Nullable thread, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get the thread detail

Parameters
threadIdThe id of the subarea to get
aCompletionBlockReturns the callback, containing an AgoraChatThread object and an AgoraChatError error object

◆ getChatThreadMemberListFromServerWithId:cursor:pageSize:completion:

- (void) getChatThreadMemberListFromServerWithId: (NSString *)  threadId
cursor: (NSString *)  aCursor
pageSize: (NSInteger)  pageSize
completion: (void(^)(AgoraChatCursorResult< NSString * > *_Nullable aResult, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get a list of members in a subsection

Parameters
threadIdThe id of the subarea to get members
aCursorcursor The position cursor of the last fetch
pageSizeNumber of single requests limit 50
aCompletionBlockReturns the callback, containing an AgoraChatCursorResult object and an AgoraChatError error object

◆ getChatThreadsFromServerWithParentId:cursor:pageSize:completion:

- (void) getChatThreadsFromServerWithParentId: (NSString *)  parentId
cursor: (NSString *)  aCursor
pageSize: (NSInteger)  aPageSize
completion: (void(^)(AgoraChatCursorResult< AgoraChatThread * > *_Nullable result, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get the subareas under a group from the server

Parameters
parentIdThe session id of the upper level of the sub-area
aCursorThe position cursor of the last fetch
pageSizeNumber of single requests limit 50
aCompletionBlockReturns the callback, containing an AgoraChatCursorResult object and an AgoraChatError error object

◆ getJoinedChatThreadsFromServerWithCursor:pageSize:completion:

- (void) getJoinedChatThreadsFromServerWithCursor: (NSString *)  aCursor
pageSize: (NSInteger)  aPageSize
completion: (void(^)(AgoraChatCursorResult< AgoraChatThread * > *_Nullable result, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get the subzones the user has joined from the server

Parameters
aCursorcursor The position cursor of the last fetch
pageSizeNumber of single requests limit 50
aCompletionBlockReturns the callback, containing an AgoraChatCursorResult object and an AgoraChatError error object

◆ getJoinedChatThreadsFromServerWithParentId:cursor:pageSize:completion:

- (void) getJoinedChatThreadsFromServerWithParentId: (NSString *)  parentId
cursor: (NSString *)  aCursor
pageSize: (NSInteger)  aPageSize
completion: (void(^)(AgoraChatCursorResult< AgoraChatThread * > *_Nullable result, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get the mine subareas under a group from the server

Parameters
parentIdThe session id of the upper level of the sub-area
aCursorThe position cursor of the last fetch
pageSizeNumber of single requests limit 50
aCompletionBlockReturns the callback, containing an AgoraChatCursorResult object and an AgoraChatError error object

◆ getLastMessageFromSeverWithChatThreads:completion:

- (void) getLastMessageFromSeverWithChatThreads: (NSArray< NSString * > *)  threadIds
completion: (void(^)(NSDictionary< NSString *, AgoraChatMessage * > *_Nullable messageMap, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get the thread detail

Parameters
threadIdsThe ids of the subarea to get(No more than 20 ids for a single request)
aCompletionBlockReturn the callback, including a dictionary key is the sub-area id, value is the AgoraChatMessage object

◆ joinChatThread:completion:

- (void) joinChatThread: (NSString *)  threadId
completion: (void(^)(AgoraChatThread *_Nullable thread, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

join a subsection

Parameters
threadIdThe id of the subzone to join
aCompletionBlockreturn callback, success or failure

◆ leaveChatThread:completion:

- (void) leaveChatThread: (NSString *)  athreadId
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

leave a subsection

Parameters
threadIdThe id of the subzone to leave
aCompletionBlockreturn callback, success or failure

◆ removeDelegate:

- (void) removeDelegate: (id< AgoraChatThreadManagerDelegate >)  aDelegate
required

Remove delegate

Parameters
aDelegateDelegate is kindof protocol AgoraChatThreadManagerDelegate

◆ removeMemberFromChatThread:threadId:completion:

- (void) removeMemberFromChatThread: (NSString *)  aUser
threadId: (NSString *)  athreadId
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Remove sub-zone members (only available for group management)

Parameters
aUserTo remove the user's ease id
threadIdsubarea id to operate
aCompletionBlockreturn callback, success or failure

◆ updateChatThreadName:threadId:completion:

- (void) updateChatThreadName: (NSString *)  name
threadId: (NSString *)  athreadId
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Update subzone name (only available for group managers or creators)

Parameters
namethe name you want to change(limit 64 character)
threadIdsubarea id to operate
aCompletionBlockreturn callback, success or failure

The documentation for this protocol was generated from the following file: