summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorFelix <me@nutomic.com>2020-04-10 14:45:48 +0200
committerFelix <me@nutomic.com>2020-04-10 14:45:48 +0200
commit5e3902a3bcf61d88fb1dda9bff17af815ff902fb (patch)
treeba63258837bc72db34cf7831cdf6cc573add813a /server
parent509005fa0c702d4909440a92cb4cf744dff72a97 (diff)
more todos
Diffstat (limited to 'server')
-rw-r--r--server/src/apub/community.rs6
-rw-r--r--server/src/apub/mod.rs3
2 files changed, 6 insertions, 3 deletions
diff --git a/server/src/apub/community.rs b/server/src/apub/community.rs
index 59c9329b..07634742 100644
--- a/server/src/apub/community.rs
+++ b/server/src/apub/community.rs
@@ -71,6 +71,8 @@ impl Community {
oprops.set_updated(convert_datetime(u))?;
}
if let Some(d) = self.description.to_owned() {
+ // TODO: this should be html, also add source field with raw markdown
+ // -> same for post.content and others
oprops.set_summary_xsd_string(d)?;
}
@@ -99,7 +101,9 @@ impl CommunityForm {
Ok(CommunityForm {
name: oprops.get_name_xsd_string().unwrap().to_string(),
title: aprops.get_preferred_username().unwrap().to_string(),
- description: oprops.get_summary_xsd_string().map(|s| s.to_string()),
+ // TODO: should be parsed as html and tags like <script> removed (or use markdown source)
+ // -> same for post.content etc
+ description: oprops.get_content_xsd_string().map(|s| s.to_string()),
category_id: 1,
creator_id: creator.id,
removed: None,
diff --git a/server/src/apub/mod.rs b/server/src/apub/mod.rs
index 37183507..e716a383 100644
--- a/server/src/apub/mod.rs
+++ b/server/src/apub/mod.rs
@@ -5,12 +5,11 @@ pub mod inbox;
pub mod post;
pub mod user;
use crate::Settings;
-use openssl::{pkey::PKey, rsa::Rsa};
-
use activitystreams::actor::{properties::ApActorProperties, Group, Person};
use activitystreams::ext::Ext;
use actix_web::body::Body;
use actix_web::HttpResponse;
+use openssl::{pkey::PKey, rsa::Rsa};
use url::Url;
type GroupExt = Ext<Group, ApActorProperties>;