mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-23 18:40:34 +00:00
Don't panic when receiving a nested comment
This commit is contained in:
parent
a436f2da4b
commit
80964b1857
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ pub trait Inbox: Actor + Sized {
|
|||
in_response_to_id: previous_comment.clone().map(|c| c.id),
|
||||
post_id: previous_comment
|
||||
.map(|c| c.post_id)
|
||||
.unwrap_or(Post::get_by_ap_url(conn, act["object"]["inReplyTo"].as_str().unwrap().to_string()).unwrap().id),
|
||||
.unwrap_or_else(|| Post::get_by_ap_url(conn, act["object"]["inReplyTo"].as_str().unwrap().to_string()).unwrap().id),
|
||||
author_id: User::from_url(conn, act["actor"].as_str().unwrap().to_string()).unwrap().id,
|
||||
sensitive: act["object"]["sensitive"].as_bool().unwrap_or(false)
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue