diff --git a/status/statusgo_backend_new/messages.nim b/status/statusgo_backend_new/messages.nim index 3dd2f2a..28e8b76 100644 --- a/status/statusgo_backend_new/messages.nim +++ b/status/statusgo_backend_new/messages.nim @@ -38,4 +38,14 @@ proc fetchMessageByMessageId*(messageId: string): RpcResponse[JsonNode] {.raises proc fetchReactionsForMessageWithId*(chatId: string, messageId: string): RpcResponse[JsonNode] {.raises: [Exception].} = let payload = %* [chatId, messageId] - result = callPrivateRPC("emojiReactionsByChatIDMessageID".prefix, payload) \ No newline at end of file + result = callPrivateRPC("emojiReactionsByChatIDMessageID".prefix, payload) + +proc fetchAllMessagesFromChatWhichMatchTerm*(chatId: string, searchTerm: string, caseSensitive: bool): + RpcResponse[JsonNode] {.raises: [Exception].} = + let payload = %* [chatId, searchTerm, caseSensitive] + result = callPrivateRPC("allMessagesFromChatWhichMatchTerm".prefix, payload) + +proc fetchAllMessagesFromChatsAndCommunitiesWhichMatchTerm*(communityIds: seq[string], chatIds: seq[string], + searchTerm: string, caseSensitive: bool): RpcResponse[JsonNode] {.raises: [Exception].} = + let payload = %* [communityIds, chatIds, searchTerm, caseSensitive] + result = callPrivateRPC("allMessagesFromChatsAndCommunitiesWhichMatchTerm".prefix, payload) \ No newline at end of file