chore: update status-go version and update mailservers api

This commit is contained in:
Jonathan Rainville 2021-02-19 13:28:10 -05:00 committed by Iuri Matias
parent 5327b7feea
commit 98b3e64573
2 changed files with 8 additions and 4 deletions

View File

@ -184,16 +184,20 @@ proc requestMessages*(self: MailserverModel, topics: seq[string], fromValue: int
proc getMailserverTopics*(self: MailserverModel): seq[MailserverTopic] =
let response = status_mailservers.getMailserverTopics()
let topics = parseJson(response)["result"]
var newTopic: MailserverTopic
result = @[]
if topics.kind != JNull:
for topic in topics:
result.add(MailserverTopic(
newTopic = MailserverTopic(
topic: topic["topic"].getStr,
discovery: topic["discovery?"].getBool,
negotiated: topic["negotiated?"].getBool,
chatIds: topic["chat-ids"].to(seq[string]),
lastRequest: topic["last-request"].getInt
))
)
if (topic["chat-ids"].kind != JNull):
newTopic.chatIds = topic["chat-ids"].to(seq[string])
result.add(newTopic)
proc getMailserverTopicsByChatId*(self: MailserverModel, chatId: string): seq[MailServerTopic] =

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit 46157dc4dc949690d66e047f451df1458a37ae23
Subproject commit 363ab0a2ab8dce98193c899c2c202cc885a45143