]> Untitled Git - lemmy.git/blobdiff - lemmy_apub/src/inbox/activities/like.rs
Move websocket code into workspace (#107)
[lemmy.git] / lemmy_apub / src / inbox / activities / like.rs
similarity index 89%
rename from src/apub/inbox/activities/like.rs
rename to lemmy_apub/src/inbox/activities/like.rs
index ce067c87990ae0271119abe923f6c3f544b47146..7b56867b4f0aa707c8f3cfda00d3a0e223feb911 100644 (file)
@@ -1,15 +1,12 @@
 use crate::{
-  apub::{
-    fetcher::{get_or_fetch_and_insert_comment, get_or_fetch_and_insert_post},
-    inbox::shared_inbox::{
-      announce_if_community_is_local,
-      get_user_from_activity,
-      receive_unhandled_activity,
-    },
-    FromApub,
-    PageExt,
+  fetcher::{get_or_fetch_and_insert_comment, get_or_fetch_and_insert_post},
+  inbox::shared_inbox::{
+    announce_if_community_is_local,
+    get_user_from_activity,
+    receive_unhandled_activity,
   },
-  LemmyContext,
+  FromApub,
+  PageExt,
 };
 use activitystreams::{activity::Like, base::AnyBase, object::Note, prelude::*};
 use actix_web::HttpResponse;
@@ -21,13 +18,13 @@ use lemmy_db::{
   post_view::PostView,
   Likeable,
 };
-use lemmy_structs::{
-  blocking,
-  comment::CommentResponse,
-  post::PostResponse,
-  websocket::{SendComment, SendPost, UserOperation},
-};
+use lemmy_structs::{blocking, comment::CommentResponse, post::PostResponse};
 use lemmy_utils::{location_info, LemmyError};
+use lemmy_websocket::{
+  messages::{SendComment, SendPost},
+  LemmyContext,
+  UserOperation,
+};
 
 pub async fn receive_like(
   activity: AnyBase,