searchConversationLocalMessage method
Future<List<Message> >
searchConversationLocalMessage({
- required String keywords,
- required String conversationId,
- ConversationType type = ConversationType.Chat,
- int timestamp = -1,
- int maxCount = 20,
- String? sender,
- SearchDirection direction = SearchDirection.Up,
Implementation
Future<List<Message>> searchConversationLocalMessage({
required String keywords,
required String conversationId,
ConversationType type = ConversationType.Chat,
int timestamp = -1,
int maxCount = 20,
String? sender,
SearchDirection direction = SearchDirection.Up,
}) {
return checkResult(ChatSDKEvent.searchConversationLocalMessage, () async {
final conversation = await createConversation(
conversationId: conversationId,
type: type,
);
return await conversation.loadMessagesWithKeyword(
keywords,
count: maxCount,
timestamp: timestamp,
sender: sender,
searchScope: MessageSearchScope.Content,
direction: direction,
);
});
}