mirror of
https://github.com/versia-pub/activitypub.git
synced 2026-03-13 10:59:17 +01:00
fix: make sensitive in AP optional bc AP
This commit is contained in:
parent
f5e4092bca
commit
474b57652b
3 changed files with 6 additions and 6 deletions
|
|
@ -41,7 +41,7 @@ pub struct Note {
|
|||
pub(crate) content: String,
|
||||
pub(crate) in_reply_to: Option<ObjectId<post::Model>>,
|
||||
pub(crate) tag: Vec<Mention>,
|
||||
pub(crate) sensitive: bool,
|
||||
pub(crate) sensitive: Option<bool>,
|
||||
pub(crate) cc: Option<Vec<Url>>,
|
||||
}
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ impl Object for post::Model {
|
|||
content: self.content,
|
||||
in_reply_to: None,
|
||||
tag: vec![],
|
||||
sensitive: self.sensitive,
|
||||
sensitive: Some(self.sensitive),
|
||||
cc: Some(to),
|
||||
})
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ impl Object for post::Model {
|
|||
content_type: Set("text/plain".to_string()), // TODO: make this use the real content type
|
||||
local: Set(false),
|
||||
visibility: Set("public".to_string()), // TODO: make this use the real visibility
|
||||
sensitive: Set(json.sensitive.clone()),
|
||||
sensitive: Set(json.sensitive.clone().unwrap_or_default()),
|
||||
url: Set(json.id.clone().to_string()),
|
||||
..Default::default()
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue