Updates for nostr-types changes

This commit is contained in:
Mike Dilger 2023-06-14 16:10:08 +12:00
parent 8380b5df92
commit 23b2c404f6
5 changed files with 11 additions and 4 deletions

View File

@ -101,7 +101,7 @@ impl DbEvent {
.read()
.feed_related_event_kinds()
.iter()
.map(|e| <EventKind as Into<u64>>::into(*e))
.map(|e| <EventKind as Into<u32>>::into(*e))
.map(|e| e.to_string())
.collect::<Vec<String>>()
.join(",");

View File

@ -133,7 +133,7 @@ impl Events {
c.push(',');
}
virgin = false;
let k: u64 = (*kind).into();
let k: u32 = (*kind).into();
c.push_str(&format!("{}", k));
}
c.push(')');

View File

@ -172,7 +172,7 @@ impl Overlord {
.read()
.feed_related_event_kinds()
.iter()
.map(|e| <EventKind as Into<u64>>::into(*e))
.map(|e| <EventKind as Into<u32>>::into(*e))
.map(|e| e.to_string())
.collect::<Vec<String>>()
.join(",");

View File

@ -29,7 +29,10 @@ pub async fn process_new_event(
raw: serde_json::to_string(&event)?,
pubkey: event.pubkey.into(),
created_at: event.created_at.0,
kind: event.kind.into(),
kind: {
let k: u32 = event.kind.into();
k.into()
},
content: event.content.clone(),
ots: event.ots.clone(),
};

View File

@ -347,6 +347,8 @@ fn render_note_inner(
vec.iter().map(|url| url.to_unchecked_url()).collect()
}
},
author: None,
kind: None,
};
ui.output_mut(|o| o.copied_text = event_pointer.as_bech32_string());
}
@ -588,6 +590,8 @@ fn render_note_inner(
.map(|url| url.to_unchecked_url())
.collect(),
},
author: None,
kind: None,
};
app.draft.push_str(&event_pointer.as_bech32_string());
app.draft_repost = None;