mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-27 18:30:31 +00:00
parent
43f20881cb
commit
89745bb37d
1 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,7 @@ use lemmy_utils::{
|
|||
};
|
||||
use rss::{
|
||||
extension::{dublincore::DublinCoreExtension, ExtensionBuilder, ExtensionMap},
|
||||
Category,
|
||||
Channel,
|
||||
EnclosureBuilder,
|
||||
Guid,
|
||||
|
@ -559,6 +560,10 @@ fn create_post_items(posts: Vec<PostView>, protocol_and_hostname: &str) -> Lemmy
|
|||
BTreeMap::from([("content".to_string(), vec![thumbnail_ext.build()])]),
|
||||
);
|
||||
}
|
||||
let category = Category {
|
||||
name: p.community.title,
|
||||
domain: Some(p.community.actor_id.to_string()),
|
||||
};
|
||||
|
||||
let i = Item {
|
||||
title: Some(sanitize_html(sanitize_xml(p.post.name).as_str())),
|
||||
|
@ -570,6 +575,7 @@ fn create_post_items(posts: Vec<PostView>, protocol_and_hostname: &str) -> Lemmy
|
|||
link: Some(post_url.clone()),
|
||||
extensions,
|
||||
enclosure: enclosure_opt,
|
||||
categories: vec![category],
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue