notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit f39154e3c9068301dc856eebeaea897697023d49
parent 155278dd3fca730faa2e4b153fe959cf03844fe9
Author: alltheseas <alltheseas@users.noreply.github.com>
Date:   Wed, 29 Oct 2025 09:12:51 -0500

Switch Copy Note ID to nevent

Diffstat:
Mcrates/notedeck/src/note/context.rs | 11++++++++---
Mcrates/notedeck_ui/src/note/context.rs | 4++--
2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/crates/notedeck/src/note/context.rs b/crates/notedeck/src/note/context.rs @@ -57,9 +57,14 @@ impl NoteContextSelection { } } NoteContextSelection::CopyNoteId => { - if let Some(bech) = NoteId::new(*note.id()).to_bech() { - ui.ctx().copy_text(bech); - } + let nip19event = nostr::nips::nip19::Nip19Event::new( + nostr::event::EventId::from_byte_array(*note.id()), + Vec::<String>::new(), + ); + let Ok(bech) = nostr::nips::nip19::ToBech32::to_bech32(&nip19event) else { + return; + }; + ui.ctx().copy_text(bech); } NoteContextSelection::CopyNoteJSON => match note.json() { Ok(json) => ui.ctx().copy_text(json), diff --git a/crates/notedeck_ui/src/note/context.rs b/crates/notedeck_ui/src/note/context.rs @@ -109,8 +109,8 @@ impl NoteContextButton { if ui .button(tr!( i18n, - "Copy Note ID", - "Copy the unique note identifier to clipboard" + "Copy nevent ID", + "Copy the nevent identifier to clipboard" )) .clicked() {