mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 19:46:50 +00:00
BUGFIX in update_metadata()
This commit is contained in:
parent
16b9027867
commit
a8ad14ae27
@ -86,8 +86,15 @@ impl People {
|
|||||||
|
|
||||||
// Update the map
|
// Update the map
|
||||||
let person = self.people.get_mut(pubkeyhex).unwrap();
|
let person = self.people.get_mut(pubkeyhex).unwrap();
|
||||||
|
|
||||||
|
// Determine whether to update it
|
||||||
|
let mut doit = person.metadata_at.is_none();
|
||||||
if let Some(metadata_at) = person.metadata_at {
|
if let Some(metadata_at) = person.metadata_at {
|
||||||
if asof.0 > metadata_at {
|
if asof.0 > metadata_at {
|
||||||
|
doit = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if doit {
|
||||||
// Process fresh metadata
|
// Process fresh metadata
|
||||||
|
|
||||||
person.name = metadata.get("name");
|
person.name = metadata.get("name");
|
||||||
@ -122,7 +129,6 @@ impl People {
|
|||||||
})
|
})
|
||||||
.await??;
|
.await??;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Remove from failed avatars list so the UI will try to fetch the avatar again
|
// Remove from failed avatars list so the UI will try to fetch the avatar again
|
||||||
GLOBALS.failed_avatars.write().await.remove(pubkeyhex);
|
GLOBALS.failed_avatars.write().await.remove(pubkeyhex);
|
||||||
|
Loading…
Reference in New Issue
Block a user