fix: removeTrustStatus response processing (#15206)
This commit is contained in:
parent
067f406572
commit
eb9c629bbf
|
@ -474,8 +474,10 @@ QtObject:
|
|||
self.events.emit(signal, ContactArgs(contactId: publicKey))
|
||||
|
||||
proc parseContactsResponse*(self: Service, response: RpcResponse[JsonNode]) =
|
||||
if response.result["contacts"] != nil:
|
||||
for contactJson in response.result["contacts"]:
|
||||
let contacts = response.result{"contacts"}
|
||||
if contacts == nil:
|
||||
return
|
||||
for contactJson in contacts:
|
||||
self.updateContact(contactJson.toContactsDto())
|
||||
|
||||
proc sendContactRequest*(self: Service, publicKey: string, message: string) =
|
||||
|
@ -720,7 +722,10 @@ QtObject:
|
|||
return
|
||||
|
||||
self.parseContactsResponse(response)
|
||||
self.parseContactsResponse(response)
|
||||
|
||||
if self.contacts.hasKey(publicKey):
|
||||
self.contacts[publicKey].dto.trustStatus = TrustStatus.Unknown
|
||||
|
||||
self.events.emit(SIGNAL_REMOVED_TRUST_STATUS, TrustArgs(publicKey: publicKey, isUntrustworthy: false))
|
||||
except Exception as e:
|
||||
error "error in removeTrustStatus request", msg = e.msg
|
||||
|
|
Loading…
Reference in New Issue