mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 19:46:50 +00:00
Updates for upstream changes
This commit is contained in:
parent
9be60a5602
commit
a90e0c0861
@ -46,7 +46,7 @@ pub async fn validate_nip05(person: DbPerson) -> Result<(), Error> {
|
||||
// Check if the response matches their public key
|
||||
match nip05.names.get(&user) {
|
||||
Some(pk) => {
|
||||
if pk.as_hex_string() == person.pubkey.0 {
|
||||
if *pk == person.pubkey {
|
||||
// Validated
|
||||
GLOBALS
|
||||
.people
|
||||
@ -89,7 +89,7 @@ pub async fn get_and_follow_nip05(dns_id: String) -> Result<(), Error> {
|
||||
.write()
|
||||
.await
|
||||
.upsert_nip05_validity(
|
||||
&(*pubkey).into(),
|
||||
pubkey,
|
||||
Some(dns_id.clone()),
|
||||
true,
|
||||
Unixtime::now().unwrap().0 as u64,
|
||||
@ -101,7 +101,7 @@ pub async fn get_and_follow_nip05(dns_id: String) -> Result<(), Error> {
|
||||
.people
|
||||
.write()
|
||||
.await
|
||||
.async_follow(&(*pubkey).into(), true)
|
||||
.async_follow(pubkey, true)
|
||||
.await?;
|
||||
|
||||
tracing::info!("Followed {}", &dns_id);
|
||||
@ -120,7 +120,7 @@ pub async fn get_and_follow_nip05(dns_id: String) -> Result<(), Error> {
|
||||
|
||||
// Save person_relay
|
||||
DbPersonRelay::upsert_last_suggested_nip05(
|
||||
(*pubkey).into(),
|
||||
pubkey.clone(),
|
||||
relay.inner().to_owned(),
|
||||
Unixtime::now().unwrap().0 as u64,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user