diff --git a/nostrss-core/src/scheduler/scheduler.rs b/nostrss-core/src/scheduler/scheduler.rs index fb4a5e9..60a70a0 100644 --- a/nostrss-core/src/scheduler/scheduler.rs +++ b/nostrss-core/src/scheduler/scheduler.rs @@ -156,7 +156,7 @@ impl RssNostrJob { let mut tags = Self::get_tags(&feed.tags); // Declare NIP-48. - tags.push(Self::get_nip48(&tags, feed.id.clone())); + tags.push(Self::get_nip48(&tags, entry.id.clone())); let message = match TemplateProcessor::parse(feed.clone(), entry.clone()) { Ok(message) => message, @@ -230,11 +230,11 @@ impl RssNostrJob { tags } - fn get_nip48(mut tags: &Vec, feed_id: String) -> Tag { + fn get_nip48(mut tags: &Vec, guid: String) -> Tag { // Declare NIP-48. // NIP-48 : declares to be a proxy from an external signal (rss,activityPub) Tag::Proxy { - id: feed_id, + id: guid, protocol: nostr_sdk::prelude::Protocol::Rss, } } @@ -295,9 +295,9 @@ mod tests { #[test] fn test_nip_48() { - let feed_id = "https://www.test.com"; + let guid = "https://www.test.com"; let mut tags: Vec = [].to_vec(); - let nip_48 = RssNostrJob::get_nip48(&tags, feed_id.clone().to_string()); + let nip_48 = RssNostrJob::get_nip48(&tags, guid.clone().to_string()); assert_eq!(nip_48.kind(), TagKind::Proxy); }