Wait for note in NostrDB before rendering it

Closes: https://github.com/damus-io/damus/issues/2885
Changelog-Changed: Use NostrDB for rendering note contents
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
Daniel D’Aquino
2025-04-09 22:49:37 -07:00
parent 8f32c81b6c
commit b5afa3c0b4
5 changed files with 21 additions and 6 deletions

View File

@@ -149,7 +149,7 @@ func create_local_notification(profiles: Profiles, notify: LocalNotification) {
func render_notification_content_preview(ndb: Ndb, ev: NostrEvent, profiles: Profiles, keypair: Keypair) -> String {
let prefix_len = 300
let artifacts = render_note_content(ndb: ndb, ev: ev, profiles: profiles, keypair: keypair)
let artifacts = render_immediately_available_note_content(ndb: ndb, ev: ev, profiles: profiles, keypair: keypair)
// special case for longform events
if ev.known_kind == .longform {