mirror of
https://git.asonix.dog/asonix/relay.git
synced 2025-01-23 01:38:06 +00:00
Error contact job on failed extraction
This commit is contained in:
parent
2479c2b39d
commit
486dabff9e
1 changed files with 7 additions and 6 deletions
|
@ -33,12 +33,13 @@ impl QueryContact {
|
|||
.fetch::<AcceptedActors>(self.contact_id.as_str())
|
||||
.await?;
|
||||
|
||||
if let Some((username, display_name, url, avatar)) = to_contact(contact) {
|
||||
state
|
||||
.node_cache
|
||||
.set_contact(self.actor_id, username, display_name, url, avatar)
|
||||
.await?;
|
||||
}
|
||||
let (username, display_name, url, avatar) = to_contact(contact)
|
||||
.ok_or_else(|| anyhow::anyhow!("Failed to extract fields from contact"))?;
|
||||
|
||||
state
|
||||
.node_cache
|
||||
.set_contact(self.actor_id, username, display_name, url, avatar)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue