chore: use upstream rust nostr

This commit is contained in:
2024-11-11 07:50:28 +07:00
parent 5103126001
commit c93edde7d2
4 changed files with 86 additions and 90 deletions

View File

@@ -104,7 +104,7 @@ pub fn create_tags(content: &str) -> Vec<Tag> {
}
if entity.starts_with("nevent") {
if let Ok(event) = Nip19Event::from_bech32(&entity) {
let relay_url = event.relays.first().map(UncheckedUrl::from);
let relay_url = event.relays.first().and_then(|i| Url::parse(i).ok());
let tag = Tag::from_standardized(TagStandard::Quote {
event_id: event.event_id,
relay_url,

View File

@@ -475,7 +475,7 @@ fn main() {
Kind::Repost,
Kind::Reaction,
Kind::ZapReceipt,
Kind::Custom(1111),
Kind::Comment,
])
.since(Timestamp::now());
@@ -603,7 +603,7 @@ fn send_event_notification(event: &Event, author: Metadata, handle: &tauri::AppH
if let Err(e) = handle
.notification()
.builder()
.body("Mentioned you in a thread.")
.body("You're mentioned in a thread.")
.title(author.display_name.unwrap_or_else(|| "Lume".to_string()))
.show()
{
@@ -614,7 +614,7 @@ fn send_event_notification(event: &Event, author: Metadata, handle: &tauri::AppH
if let Err(e) = handle
.notification()
.builder()
.body("Reposted your note.")
.body("Your note has been reposted.")
.title(author.display_name.unwrap_or_else(|| "Lume".to_string()))
.show()
{
@@ -625,7 +625,7 @@ fn send_event_notification(event: &Event, author: Metadata, handle: &tauri::AppH
if let Err(e) = handle
.notification()
.builder()
.body("Zapped you.")
.body("You've received zap.")
.title(author.display_name.unwrap_or_else(|| "Lume".to_string()))
.show()
{