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
|
// Check if the response matches their public key
|
||||||
match nip05.names.get(&user) {
|
match nip05.names.get(&user) {
|
||||||
Some(pk) => {
|
Some(pk) => {
|
||||||
if pk.as_hex_string() == person.pubkey.0 {
|
if *pk == person.pubkey {
|
||||||
// Validated
|
// Validated
|
||||||
GLOBALS
|
GLOBALS
|
||||||
.people
|
.people
|
||||||
@ -89,7 +89,7 @@ pub async fn get_and_follow_nip05(dns_id: String) -> Result<(), Error> {
|
|||||||
.write()
|
.write()
|
||||||
.await
|
.await
|
||||||
.upsert_nip05_validity(
|
.upsert_nip05_validity(
|
||||||
&(*pubkey).into(),
|
pubkey,
|
||||||
Some(dns_id.clone()),
|
Some(dns_id.clone()),
|
||||||
true,
|
true,
|
||||||
Unixtime::now().unwrap().0 as u64,
|
Unixtime::now().unwrap().0 as u64,
|
||||||
@ -101,7 +101,7 @@ pub async fn get_and_follow_nip05(dns_id: String) -> Result<(), Error> {
|
|||||||
.people
|
.people
|
||||||
.write()
|
.write()
|
||||||
.await
|
.await
|
||||||
.async_follow(&(*pubkey).into(), true)
|
.async_follow(pubkey, true)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
tracing::info!("Followed {}", &dns_id);
|
tracing::info!("Followed {}", &dns_id);
|
||||||
@ -120,7 +120,7 @@ pub async fn get_and_follow_nip05(dns_id: String) -> Result<(), Error> {
|
|||||||
|
|
||||||
// Save person_relay
|
// Save person_relay
|
||||||
DbPersonRelay::upsert_last_suggested_nip05(
|
DbPersonRelay::upsert_last_suggested_nip05(
|
||||||
(*pubkey).into(),
|
pubkey.clone(),
|
||||||
relay.inner().to_owned(),
|
relay.inner().to_owned(),
|
||||||
Unixtime::now().unwrap().0 as u64,
|
Unixtime::now().unwrap().0 as u64,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user