]> Untitled Git - lemmy.git/blobdiff - lemmy_apub/src/inbox/activities/update.rs
Move websocket code into workspace (#107)
[lemmy.git] / lemmy_apub / src / inbox / activities / update.rs
similarity index 89%
rename from src/apub/inbox/activities/update.rs
rename to lemmy_apub/src/inbox/activities/update.rs
index ccf7534bcc481905553d2969b5ae687186fa925b..17d9d7084f7c14eb59053a2f5e1563dcbaf9c73a 100644 (file)
@@ -1,16 +1,13 @@
 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,
-    },
-    ActorType,
-    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,
+  ActorType,
+  FromApub,
+  PageExt,
 };
 use activitystreams::{activity::Update, base::AnyBase, object::Note, prelude::*};
 use actix_web::HttpResponse;
@@ -22,14 +19,13 @@ use lemmy_db::{
   post_view::PostView,
   Crud,
 };
-use lemmy_structs::{
-  blocking,
-  comment::CommentResponse,
-  post::PostResponse,
-  send_local_notifs,
-  websocket::{SendComment, SendPost, UserOperation},
-};
+use lemmy_structs::{blocking, comment::CommentResponse, post::PostResponse, send_local_notifs};
 use lemmy_utils::{location_info, utils::scrape_text_for_mentions, LemmyError};
+use lemmy_websocket::{
+  messages::{SendComment, SendPost},
+  LemmyContext,
+  UserOperation,
+};
 
 pub async fn receive_update(
   activity: AnyBase,