From b3fa8ff84082d932078c994da938bd20d657cd39 Mon Sep 17 00:00:00 2001 From: billy-the-fish Date: Mon, 11 Sep 2023 15:53:32 +0200 Subject: [PATCH] Update on review. --- .../threading/thread-messages/project-implementation/ios.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/chat-sdk/client-api/threading/thread-messages/project-implementation/ios.mdx b/shared/chat-sdk/client-api/threading/thread-messages/project-implementation/ios.mdx index 231ea158d..357ae1d9e 100644 --- a/shared/chat-sdk/client-api/threading/thread-messages/project-implementation/ios.mdx +++ b/shared/chat-sdk/client-api/threading/thread-messages/project-implementation/ios.mdx @@ -71,7 +71,7 @@ You can check `AgoraChatConversation#isChatThread()` to determine whether the cu You can call `asyncFetchHistoryMessagesFromServer` to retrieve messages of a thread from the server. The only difference between retrieving messages of a thread from the server and retrieving group messages is that a thread ID needs to be passed in for the former and a group ID is required for the latter. -```ObjectiveC +```objc [AgoraChatClient.sharedClient.chatManager asyncFetchHistoryMessagesFromServer:@"threadId" conversationType:AgoraChatConversationTypeGroupChat startMessageId:@"" fetchDirection:AgoraChatMessageFetchHistoryDirectionUp pageSize:20 completion:^(AgoraChatCursorResult * _Nullable aResult, AgoraChatError * _Nullable aError) { }]; @@ -79,7 +79,7 @@ You can call `asyncFetchHistoryMessagesFromServer` to retrieve messages of a thr #### Retrieve messages of a thread locally By calling [`getAllConversations`](/agora-chat/client-api/messages/manage-messages#retrieve-conversations), you can only retrieve local one-to-one chat conversations and group conversations. To retrieve messages of a thread locally, refer to the following code sample: -```ObjectiveC +```objc AgoraChatConversation *conversation = [AgoraChatClient.sharedClient.chatManager getConversation:@"threadId" type:AgoraChatConversationTypeGroupChat createIfNotExist:NO isThread:YES]; [conversation loadMessagesStartFromId:msgId count:50 searchDirection:AgoraChatMessageSearchDirectionUp completion:^(NSArray *aMessages, AgoraChatError *aError) { }];