mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-18 03:03:45 +00:00
Merge remote-tracking branch 'fiatjaf/bare-domains'
This commit is contained in:
commit
1c44e0baa2
@ -602,6 +602,9 @@ impl Overlord {
|
||||
|
||||
async fn get_and_follow_nip35(nip35: String) -> Result<(), Error> {
|
||||
let mut parts: Vec<&str> = nip35.split('@').collect();
|
||||
if parts.len() == 1 {
|
||||
parts = Vec::from(["_", parts.get(0).unwrap()])
|
||||
}
|
||||
if parts.len() != 2 {
|
||||
return Err(Error::InvalidDnsId);
|
||||
}
|
||||
|
@ -316,13 +316,18 @@ impl GossipUi {
|
||||
ui.label("🚶");
|
||||
}
|
||||
|
||||
if let Some(dns_id) = &person.dns_id {
|
||||
if let Some(mut dns_id) = person.dns_id.clone() {
|
||||
if dns_id.starts_with("_@") {
|
||||
dns_id = dns_id.get(2..).unwrap().to_string();
|
||||
}
|
||||
|
||||
if person.dns_id_valid > 0 {
|
||||
ui.label(RichText::new(dns_id).monospace().small());
|
||||
} else {
|
||||
ui.label(RichText::new(dns_id).monospace().small().strikethrough());
|
||||
}
|
||||
}
|
||||
|
||||
ui.label(RichText::new("🔑").text_style(TextStyle::Small).weak());
|
||||
if ui.add(CopyButton {}).clicked() {
|
||||
ui.output().copied_text = person.pubkey.0.to_owned();
|
||||
|
Loading…
Reference in New Issue
Block a user