From e403099f47c27abf3e4ffff0719560c4a683b938 Mon Sep 17 00:00:00 2001 From: Bat Date: Sun, 10 Jun 2018 12:53:39 +0100 Subject: [PATCH] CWs are optional --- src/activity_pub/inbox.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activity_pub/inbox.rs b/src/activity_pub/inbox.rs index 3351fe22..ae406671 100644 --- a/src/activity_pub/inbox.rs +++ b/src/activity_pub/inbox.rs @@ -55,7 +55,7 @@ pub trait Inbox { let previous_comment = Comment::find_by_ap_url(conn, previous_url.clone()); Comment::insert(conn, NewComment { content: note.object_props.content_string().unwrap(), - spoiler_text: note.object_props.summary_string().unwrap(), + spoiler_text: note.object_props.summary_string().unwrap_or(String::from("")), ap_url: note.object_props.id_string().ok(), in_response_to_id: previous_comment.clone().map(|c| c.id), post_id: previous_comment