go-waku store protocol

This commit is contained in:
Richard Ramos 2021-06-10 09:04:32 -04:00 committed by Iuri Matias
parent 561991da67
commit 5daf7894f5
2 changed files with 10 additions and 0 deletions

View File

@ -461,3 +461,10 @@ QtObject:
proc markMessageAsSent*(self: ChatsView, chat: string, messageId: string) =
self.messageView.markMessageAsSent(chat, messageId)
proc requestAllHistoricMessages(self: ChatsView) {.slot.} =
debug "Requesting messages"
# TODO: the mailservers must change depending on whether we are using wakuV1 or wakuV2
# in the meantime I'm hardcoding a specific mailserver
echo status_mailservers.setMailserver("16Uiu2HAmVVi6Q4j7MAKVibquW8aA27UNrA4Q8Wkz9EetGViu8ZF1")
echo status_mailservers.requestAllHistoricMessages()

View File

@ -12,6 +12,9 @@ proc ping*(mailservers: seq[string], timeoutMs: int): string =
proc update*(peer: string) =
discard callPrivateRPC("updateMailservers".prefix, %* [[peer]])
proc setMailserver*(peer: string): string =
return callPrivateRPC("setMailserver".prefix, %* [peer])
proc delete*(peer: string) =
discard callPrivateRPC("mailservers_deleteMailserver", %* [peer])