use crate::{
api::{
comment::{send_local_notifs, CommentResponse},
community::CommunityResponse,
post::PostResponse,
},
apub::{
extensions::signatures::verify,
fetcher::get_or_fetch_and_upsert_remote_user,
FromApub,
GroupExt,
PageExt,
},
db::{
activity::insert_activity,
comment::{Comment, CommentForm, CommentLike, CommentLikeForm},
comment_view::CommentView,
community::{Community, CommunityForm},
community_view::CommunityView,
post::{Post, PostForm, PostLike, PostLikeForm},
post_view::PostView,
Crud,
Likeable,
},
naive_now,
routes::{ChatServerParam, DbPoolParam},
scrape_text_for_mentions,
websocket::{
server::{SendComment, SendCommunityRoomMessage, SendPost},
UserOperation,
},
};
use activitystreams::{
activity::{Create, Delete, Dislike, Like, Remove, Undo, Update},
object::Note,
BaseBox,
};
use actix_web::{web, HttpRequest, HttpResponse, Result};
use diesel::PgConnection;
use failure::{Error, <