forked from janek/mostr
1
0
Fork 0

feat(task): expose remaining relevant event properties

This commit is contained in:
xeruf 2024-08-18 21:38:20 +03:00
parent 903536bd3b
commit 19d0fbb8fc
1 changed files with 3 additions and 1 deletions

View File

@ -10,7 +10,7 @@ use itertools::Itertools;
use log::{debug, error, info, trace, warn}; use log::{debug, error, info, trace, warn};
use nostr_sdk::{Event, EventId, Kind, Tag, TagStandard, Timestamp}; use nostr_sdk::{Event, EventId, Kind, Tag, TagStandard, Timestamp};
use crate::helpers::some_non_empty; use crate::helpers::{local_datetimestamp, some_non_empty};
use crate::kinds::{is_hashtag, PROCEDURE_KIND}; use crate::kinds::{is_hashtag, PROCEDURE_KIND};
pub static MARKER_PARENT: &str = "parent"; pub static MARKER_PARENT: &str = "parent";
@ -160,6 +160,8 @@ impl Task {
"{:?}", "{:?}",
self.descriptions().collect_vec() self.descriptions().collect_vec()
)), )),
"pubkey" => Some(self.event.pubkey.to_string()),
"created" => Some(local_datetimestamp(&self.event.created_at)),
_ => { _ => {
warn!("Unknown task property {}", property); warn!("Unknown task property {}", property);
None None