Simplify the Inbox trait
If we want to add, for instance, streams in the future, we could introduce a new trait for that, similar to FromActivity or Notify We also display inbox errors to the "client" if something fails, which could be useful for debugging.
This commit is contained in:
@@ -44,7 +44,8 @@ fn create_response(blog_name: String, slug: String, query: Option<CommentQuery>,
|
||||
.create(&*conn);
|
||||
|
||||
let instance = Instance::get_local(&*conn).unwrap();
|
||||
instance.received(&*conn, serde_json::to_value(new_comment.clone()).expect("JSON serialization error"));
|
||||
instance.received(&*conn, serde_json::to_value(new_comment.clone()).expect("JSON serialization error"))
|
||||
.expect("We are not compatible with ourselve: local broadcast failed (new comment)");
|
||||
broadcast(&user, new_comment, user.get_followers(&*conn));
|
||||
|
||||
Redirect::to(format!("/~/{}/{}/#comment-{}", blog_name, slug, id))
|
||||
|
||||
Reference in New Issue
Block a user