diff --git a/status/statusgo_backend_new/messages.nim b/status/statusgo_backend_new/messages.nim index 28e8b76..88c1d98 100644 --- a/status/statusgo_backend_new/messages.nim +++ b/status/statusgo_backend_new/messages.nim @@ -48,4 +48,13 @@ proc fetchAllMessagesFromChatWhichMatchTerm*(chatId: string, searchTerm: string, 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 + result = callPrivateRPC("allMessagesFromChatsAndCommunitiesWhichMatchTerm".prefix, payload) + +proc markAllMessagesFromChatWithIdAsRead*(chatId: string): RpcResponse[JsonNode] {.raises: [Exception].} = + let payload = %* [chatId] + result = callPrivateRPC("markAllRead".prefix, payload) + +proc markCertainMessagesFromChatWithIdAsRead*(chatId: string, messageIds: seq[string]): + RpcResponse[JsonNode] {.raises: [Exception].} = + let payload = %* [chatId, messageIds] + result = callPrivateRPC("markMessagesSeen".prefix, payload) \ No newline at end of file