fix: code review
This commit is contained in:
parent
997e34ed8a
commit
e4b4bf9900
|
@ -61,7 +61,6 @@ proc addContact*(self: ContactModel, id: string, localNickname: string): string
|
||||||
)
|
)
|
||||||
|
|
||||||
let updating = contact.systemTags.contains(":contact/added")
|
let updating = contact.systemTags.contains(":contact/added")
|
||||||
echo "C"
|
|
||||||
if not updating:
|
if not updating:
|
||||||
contact.systemTags.add(":contact/added")
|
contact.systemTags.add(":contact/added")
|
||||||
let nickname =
|
let nickname =
|
||||||
|
@ -73,6 +72,7 @@ proc addContact*(self: ContactModel, id: string, localNickname: string): string
|
||||||
localNickname
|
localNickname
|
||||||
result = status_contacts.saveContact(contact.id, contact.ensVerified, contact.ensName, contact.ensVerifiedAt, contact.ensVerificationRetries, contact.alias, contact.identicon, contact.systemTags, nickname)
|
result = status_contacts.saveContact(contact.id, contact.ensVerified, contact.ensName, contact.ensVerifiedAt, contact.ensVerificationRetries, contact.alias, contact.identicon, contact.systemTags, nickname)
|
||||||
self.events.emit("contactAdded", Args())
|
self.events.emit("contactAdded", Args())
|
||||||
|
discard requestContactUpdate(contact.id)
|
||||||
if updating:
|
if updating:
|
||||||
let profile = Profile(
|
let profile = Profile(
|
||||||
id: contact.id,
|
id: contact.id,
|
||||||
|
|
|
@ -40,6 +40,5 @@ proc saveContact*(id: string, ensVerified: bool, ensName: string, ensVerifiedAt:
|
||||||
}]
|
}]
|
||||||
callPrivateRPC("saveContact".prefix, payload)
|
callPrivateRPC("saveContact".prefix, payload)
|
||||||
|
|
||||||
proc requestContactUpdate*(): string =
|
proc requestContactUpdate*(publicKey: string): string =
|
||||||
let publicKey = $getSetting[string](Setting.PublicKey, "")
|
|
||||||
callPrivateRPC("sendContactUpdate".prefix, %* [publicKey, "", ""])
|
callPrivateRPC("sendContactUpdate".prefix, %* [publicKey, "", ""])
|
Loading…
Reference in New Issue