]> Untitled Git - lemmy.git/commitdiff
Rename `lemmy_structs` to `lemmy_api_structs`
authorFelix Ableitner <me@nutomic.com>
Mon, 1 Mar 2021 13:08:41 +0000 (14:08 +0100)
committerFelix Ableitner <me@nutomic.com>
Mon, 1 Mar 2021 13:08:41 +0000 (14:08 +0100)
60 files changed:
Cargo.lock
Cargo.toml
crates/api/Cargo.toml
crates/api/src/comment.rs
crates/api/src/community.rs
crates/api/src/lib.rs
crates/api/src/post.rs
crates/api/src/routes.rs
crates/api/src/site.rs
crates/api/src/user.rs
crates/api/src/websocket.rs
crates/api_structs/Cargo.toml [moved from crates/structs/Cargo.toml with 87% similarity]
crates/api_structs/src/comment.rs [moved from crates/structs/src/comment.rs with 100% similarity]
crates/api_structs/src/community.rs [moved from crates/structs/src/community.rs with 100% similarity]
crates/api_structs/src/lib.rs [moved from crates/structs/src/lib.rs with 100% similarity]
crates/api_structs/src/post.rs [moved from crates/structs/src/post.rs with 100% similarity]
crates/api_structs/src/site.rs [moved from crates/structs/src/site.rs with 100% similarity]
crates/api_structs/src/user.rs [moved from crates/structs/src/user.rs with 100% similarity]
crates/api_structs/src/websocket.rs [moved from crates/structs/src/websocket.rs with 100% similarity]
crates/apub/Cargo.toml
crates/apub/src/activities/receive/comment.rs
crates/apub/src/activities/receive/comment_undo.rs
crates/apub/src/activities/receive/community.rs
crates/apub/src/activities/receive/post.rs
crates/apub/src/activities/receive/post_undo.rs
crates/apub/src/activities/receive/private_message.rs
crates/apub/src/activities/send/comment.rs
crates/apub/src/activities/send/community.rs
crates/apub/src/activities/send/post.rs
crates/apub/src/activities/send/private_message.rs
crates/apub/src/activities/send/user.rs
crates/apub/src/fetcher/community.rs
crates/apub/src/fetcher/objects.rs
crates/apub/src/fetcher/search.rs
crates/apub/src/fetcher/user.rs
crates/apub/src/http/comment.rs
crates/apub/src/http/community.rs
crates/apub/src/http/mod.rs
crates/apub/src/http/post.rs
crates/apub/src/http/user.rs
crates/apub/src/inbox/community_inbox.rs
crates/apub/src/inbox/mod.rs
crates/apub/src/inbox/receive_for_community.rs
crates/apub/src/inbox/shared_inbox.rs
crates/apub/src/inbox/user_inbox.rs
crates/apub/src/lib.rs
crates/apub/src/objects/comment.rs
crates/apub/src/objects/community.rs
crates/apub/src/objects/mod.rs
crates/apub/src/objects/post.rs
crates/apub/src/objects/private_message.rs
crates/apub/src/objects/user.rs
crates/routes/Cargo.toml
crates/routes/src/feeds.rs
crates/routes/src/nodeinfo.rs
crates/routes/src/webfinger.rs
crates/websocket/Cargo.toml
crates/websocket/src/chat_server.rs
crates/websocket/src/messages.rs
src/main.rs

index cdf7f679c859fa7a97d19a53ea2aea430f0b0c1d..13d67faa538a184924c088abd5a7f6b6f570adef 100644 (file)
@@ -1734,13 +1734,13 @@ dependencies = [
  "http-signature-normalization-actix",
  "itertools",
  "lazy_static",
+ "lemmy_api_structs",
  "lemmy_apub",
  "lemmy_db_queries",
  "lemmy_db_schema",
  "lemmy_db_views",
  "lemmy_db_views_actor",
  "lemmy_db_views_moderator",
- "lemmy_structs",
  "lemmy_utils",
  "lemmy_websocket",
  "log",
@@ -1758,6 +1758,25 @@ dependencies = [
  "uuid",
 ]
 
+[[package]]
+name = "lemmy_api_structs"
+version = "0.1.0"
+dependencies = [
+ "actix-web",
+ "chrono",
+ "diesel",
+ "lemmy_db_queries",
+ "lemmy_db_schema",
+ "lemmy_db_views",
+ "lemmy_db_views_actor",
+ "lemmy_db_views_moderator",
+ "lemmy_utils",
+ "log",
+ "serde 1.0.123",
+ "serde_json",
+ "url",
+]
+
 [[package]]
 name = "lemmy_apub"
 version = "0.1.0"
@@ -1782,11 +1801,11 @@ dependencies = [
  "http-signature-normalization-reqwest",
  "itertools",
  "lazy_static",
+ "lemmy_api_structs",
  "lemmy_db_queries",
  "lemmy_db_schema",
  "lemmy_db_views",
  "lemmy_db_views_actor",
- "lemmy_structs",
  "lemmy_utils",
  "lemmy_websocket",
  "log",
@@ -1884,11 +1903,11 @@ dependencies = [
  "chrono",
  "diesel",
  "lazy_static",
+ "lemmy_api_structs",
  "lemmy_db_queries",
  "lemmy_db_schema",
  "lemmy_db_views",
  "lemmy_db_views_actor",
- "lemmy_structs",
  "lemmy_utils",
  "lemmy_websocket",
  "log",
@@ -1916,6 +1935,7 @@ dependencies = [
  "env_logger",
  "http-signature-normalization-actix",
  "lemmy_api",
+ "lemmy_api_structs",
  "lemmy_apub",
  "lemmy_db_queries",
  "lemmy_db_schema",
@@ -1923,7 +1943,6 @@ dependencies = [
  "lemmy_db_views_actor",
  "lemmy_db_views_moderator",
  "lemmy_routes",
- "lemmy_structs",
  "lemmy_utils",
  "lemmy_websocket",
  "log",
@@ -1936,25 +1955,6 @@ dependencies = [
  "url",
 ]
 
-[[package]]
-name = "lemmy_structs"
-version = "0.1.0"
-dependencies = [
- "actix-web",
- "chrono",
- "diesel",
- "lemmy_db_queries",
- "lemmy_db_schema",
- "lemmy_db_views",
- "lemmy_db_views_actor",
- "lemmy_db_views_moderator",
- "lemmy_utils",
- "log",
- "serde 1.0.123",
- "serde_json",
- "url",
-]
-
 [[package]]
 name = "lemmy_utils"
 version = "0.1.0"
@@ -1998,9 +1998,9 @@ dependencies = [
  "background-jobs",
  "chrono",
  "diesel",
+ "lemmy_api_structs",
  "lemmy_db_queries",
  "lemmy_db_schema",
- "lemmy_structs",
  "lemmy_utils",
  "log",
  "rand 0.8.3",
index ab7d90198390b8f7bda8457bfef93b1bf4210651..f76128cb42add5c738d5f3f771e85565254927b4 100644 (file)
@@ -19,7 +19,7 @@ members = [
     "crates/db_views",
     "crates/db_views_actor",
     "crates/db_views_actor",
-    "crates/structs",
+    "crates/api_structs",
     "crates/websocket",
     "crates/routes"
 ]
@@ -33,7 +33,7 @@ lemmy_db_queries = { path = "./crates/db_queries" }
 lemmy_db_views = { path = "./crates/db_views" }
 lemmy_db_views_moderator = { path = "./crates/db_views_moderator" }
 lemmy_db_views_actor = { path = "./crates/db_views_actor" }
-lemmy_structs = { path = "./crates/structs" }
+lemmy_api_structs = { path = "crates/api_structs" }
 lemmy_websocket = { path = "./crates/websocket" }
 lemmy_routes = { path = "./crates/routes" }
 diesel = "1.4.5"
index 299121a6eba68740720c4b58cda9ef4fdfccc81c..5ab3395845d4e85f708e548285173634f521a43b 100644 (file)
@@ -1,7 +1,6 @@
 [package]
 name = "lemmy_api"
 version = "0.1.0"
-authors = ["Felix Ableitner <me@nutomic.com>"]
 edition = "2018"
 
 [lib]
@@ -17,7 +16,7 @@ lemmy_db_schema = { path = "../db_schema" }
 lemmy_db_views = { path = "../db_views" }
 lemmy_db_views_moderator = { path = "../db_views_moderator" }
 lemmy_db_views_actor = { path = "../db_views_actor" }
-lemmy_structs = { path = "../structs" }
+lemmy_api_structs = { path = "../api_structs" }
 lemmy_websocket = { path = "../websocket" }
 diesel = "1.4.5"
 bcrypt = "0.9.0"
index 02acc7f85ce7b92048c1126091689c71f6d60efd..cb8b2d515a96aac06230b864db7b501635d0d727 100644 (file)
@@ -9,6 +9,7 @@ use crate::{
   Perform,
 };
 use actix_web::web::Data;
+use lemmy_api_structs::{blocking, comment::*, send_local_notifs};
 use lemmy_apub::{generate_apub_endpoint, ApubLikeableType, ApubObjectType, EndpointType};
 use lemmy_db_queries::{
   source::comment::Comment_,
@@ -24,7 +25,6 @@ use lemmy_db_views::{
   comment_report_view::{CommentReportQueryBuilder, CommentReportView},
   comment_view::{CommentQueryBuilder, CommentView},
 };
-use lemmy_structs::{blocking, comment::*, send_local_notifs};
 use lemmy_utils::{
   utils::{remove_slurs, scrape_text_for_mentions},
   ApiError,
index 128d8b3031d1519a68a2a0398a6b96dd273605e1..4bfbaeb4a592a2490b55506985b18e0fb6deca34 100644 (file)
@@ -9,6 +9,7 @@ use crate::{
 };
 use actix_web::web::Data;
 use anyhow::Context;
+use lemmy_api_structs::{blocking, community::*};
 use lemmy_apub::{
   generate_apub_endpoint,
   generate_followers_url,
@@ -43,7 +44,6 @@ use lemmy_db_views_actor::{
   community_view::{CommunityQueryBuilder, CommunityView},
   user_view::UserViewSafe,
 };
-use lemmy_structs::{blocking, community::*};
 use lemmy_utils::{
   apub::generate_actor_keypair,
   location_info,
index 5642c4b9c7a31f0a9a744af2ac70e8a974a2062d..871e8e9d8b21f81493b1b0420ba2e18f8a67e868 100644 (file)
@@ -1,4 +1,13 @@
 use actix_web::{web, web::Data};
+use lemmy_api_structs::{
+  blocking,
+  comment::*,
+  community::*,
+  post::*,
+  site::*,
+  user::*,
+  websocket::*,
+};
 use lemmy_db_queries::{
   source::{
     community::{CommunityModerator_, Community_},
@@ -18,7 +27,6 @@ use lemmy_db_views_actor::{
   community_user_ban_view::CommunityUserBanView,
   community_view::CommunityView,
 };
-use lemmy_structs::{blocking, comment::*, community::*, post::*, site::*, user::*, websocket::*};
 use lemmy_utils::{claims::Claims, settings::Settings, ApiError, ConnectionId, LemmyError};
 use lemmy_websocket::{serialize_websocket_message, LemmyContext, UserOperation};
 use serde::Deserialize;
index 4ef07ae560e26c394edd31e71a124a11fd208de7..e905cd5cf837debcf76140d766a9e1a00d0cbfcf 100644 (file)
@@ -9,6 +9,7 @@ use crate::{
   Perform,
 };
 use actix_web::web::Data;
+use lemmy_api_structs::{blocking, post::*};
 use lemmy_apub::{generate_apub_endpoint, ApubLikeableType, ApubObjectType, EndpointType};
 use lemmy_db_queries::{
   source::post::Post_,
@@ -36,7 +37,6 @@ use lemmy_db_views_actor::{
   community_moderator_view::CommunityModeratorView,
   community_view::CommunityView,
 };
-use lemmy_structs::{blocking, post::*};
 use lemmy_utils::{
   request::fetch_iframely_and_pictrs_data,
   utils::{check_slurs, check_slurs_opt, is_valid_post_title},
index 7ca609f1ac40f668f81dfee3a836ddf834d1497e..a64e0bffd0621b8240be16a68e30864b4359c88f 100644 (file)
@@ -1,6 +1,6 @@
 use crate::Perform;
 use actix_web::{error::ErrorBadRequest, *};
-use lemmy_structs::{comment::*, community::*, post::*, site::*, user::*, websocket::*};
+use lemmy_api_structs::{comment::*, community::*, post::*, site::*, user::*, websocket::*};
 use lemmy_utils::rate_limit::RateLimit;
 use lemmy_websocket::{routes::chat_route, LemmyContext};
 use serde::Deserialize;
index b545a72eabd78a108324b3dae7f1e0ee999ec31b..716b67237eb65f502e87dbda0f7fbaad58797e34 100644 (file)
@@ -9,6 +9,7 @@ use crate::{
 };
 use actix_web::web::Data;
 use anyhow::Context;
+use lemmy_api_structs::{blocking, site::*, user::Register};
 use lemmy_apub::fetcher::search::search_by_apub_id;
 use lemmy_db_queries::{diesel_option_overwrite, source::site::Site_, Crud, SearchType, SortType};
 use lemmy_db_schema::{
@@ -38,7 +39,6 @@ use lemmy_db_views_moderator::{
   mod_remove_post_view::ModRemovePostView,
   mod_sticky_post_view::ModStickyPostView,
 };
-use lemmy_structs::{blocking, site::*, user::Register};
 use lemmy_utils::{
   location_info,
   settings::Settings,
index c6877fe0de86f581b0df8826c6dd618938c835ca..d6395e6b743691abaf1ad3c077cf99934213e974 100644 (file)
@@ -12,6 +12,7 @@ use anyhow::Context;
 use bcrypt::verify;
 use captcha::{gen, Difficulty};
 use chrono::Duration;
+use lemmy_api_structs::{blocking, send_email_to_user, user::*};
 use lemmy_apub::{
   generate_apub_endpoint,
   generate_followers_url,
@@ -65,7 +66,6 @@ use lemmy_db_views_actor::{
   user_mention_view::{UserMentionQueryBuilder, UserMentionView},
   user_view::UserViewSafe,
 };
-use lemmy_structs::{blocking, send_email_to_user, user::*};
 use lemmy_utils::{
   apub::generate_actor_keypair,
   claims::Claims,
index 4342f15b845e6ae1630680f9cb3d6ddf65257543..58933712d38e245518bc58240c2847d304d5629a 100644 (file)
@@ -1,6 +1,6 @@
 use crate::{get_user_from_jwt, Perform};
 use actix_web::web::Data;
-use lemmy_structs::websocket::*;
+use lemmy_api_structs::websocket::*;
 use lemmy_utils::{ConnectionId, LemmyError};
 use lemmy_websocket::{
   messages::{JoinCommunityRoom, JoinModRoom, JoinPostRoom, JoinUserRoom},
similarity index 87%
rename from crates/structs/Cargo.toml
rename to crates/api_structs/Cargo.toml
index de4f38cbf310563383329715fcb9cb71c45c8711..fc91e759aac65e6b2e3eccf4ada0ce2aaa5ebf4e 100644 (file)
@@ -1,11 +1,10 @@
 [package]
-name = "lemmy_structs"
+name = "lemmy_api_structs"
 version = "0.1.0"
-authors = ["Felix Ableitner <me@nutomic.com>"]
 edition = "2018"
 
 [lib]
-name = "lemmy_structs"
+name = "lemmy_api_structs"
 path = "src/lib.rs"
 doctest = false
 
index 9dd9bc82f5dbc5557ed83185dc09bd67287754bd..d294cbd9dab505bb60db08613dd604dc1ccacf59 100644 (file)
@@ -1,7 +1,6 @@
 [package]
 name = "lemmy_apub"
 version = "0.1.0"
-authors = ["Felix Ableitner <me@nutomic.com>"]
 edition = "2018"
 
 [lib]
@@ -15,7 +14,7 @@ lemmy_db_queries = { path = "../db_queries" }
 lemmy_db_schema = { path = "../db_schema" }
 lemmy_db_views = { path = "../db_views" }
 lemmy_db_views_actor = { path = "../db_views_actor" }
-lemmy_structs = { path = "../structs" }
+lemmy_api_structs = { path = "../api_structs" }
 lemmy_websocket = { path = "../websocket" }
 diesel = "1.4.5"
 activitystreams = "0.7.0-alpha.10"
index 6136f63bbeeeedf8e05f8c2f66222b38149448ce..591b6f33a279321378daf9fea0a7f95c7bb8f46d 100644 (file)
@@ -4,13 +4,13 @@ use activitystreams::{
   base::ExtendsExt,
 };
 use anyhow::Context;
+use lemmy_api_structs::{blocking, comment::CommentResponse, send_local_notifs};
 use lemmy_db_queries::{source::comment::Comment_, Crud, Likeable};
 use lemmy_db_schema::source::{
   comment::{Comment, CommentLike, CommentLikeForm},
   post::Post,
 };
 use lemmy_db_views::comment_view::CommentView;
-use lemmy_structs::{blocking, comment::CommentResponse, send_local_notifs};
 use lemmy_utils::{location_info, utils::scrape_text_for_mentions, LemmyError};
 use lemmy_websocket::{messages::SendComment, LemmyContext, UserOperation};
 
index 5dc021ad3753cf951f80d1b7cd8ecbb536361a75..7027171554ec5bf28565cfb9d31958ac9afe09f6 100644 (file)
@@ -1,9 +1,9 @@
 use crate::activities::receive::get_actor_as_user;
 use activitystreams::activity::{Dislike, Like};
+use lemmy_api_structs::{blocking, comment::CommentResponse};
 use lemmy_db_queries::{source::comment::Comment_, Likeable};
 use lemmy_db_schema::source::comment::{Comment, CommentLike};
 use lemmy_db_views::comment_view::CommentView;
-use lemmy_structs::{blocking, comment::CommentResponse};
 use lemmy_utils::LemmyError;
 use lemmy_websocket::{messages::SendComment, LemmyContext, UserOperation};
 
index 54a8cdb7a9150788c5758a08a1dfa8e206417445..854e75f26f4ac0c15e30b8807f216248d7761407 100644 (file)
@@ -4,10 +4,10 @@ use activitystreams::{
   base::{AnyBase, ExtendsExt},
 };
 use anyhow::Context;
+use lemmy_api_structs::{blocking, community::CommunityResponse};
 use lemmy_db_queries::{source::community::Community_, ApubObject};
 use lemmy_db_schema::source::community::Community;
 use lemmy_db_views_actor::community_view::CommunityView;
-use lemmy_structs::{blocking, community::CommunityResponse};
 use lemmy_utils::{location_info, LemmyError};
 use lemmy_websocket::{messages::SendCommunityRoomMessage, LemmyContext, UserOperation};
 use url::Url;
index 42635864643160c418a792819eb43c7446fdcdc3..0fb6c88071420b68b3dd76e481b610b0f0acba24 100644 (file)
@@ -4,10 +4,10 @@ use activitystreams::{
   prelude::*,
 };
 use anyhow::Context;
+use lemmy_api_structs::{blocking, post::PostResponse};
 use lemmy_db_queries::{source::post::Post_, Likeable};
 use lemmy_db_schema::source::post::{Post, PostLike, PostLikeForm};
 use lemmy_db_views::post_view::PostView;
-use lemmy_structs::{blocking, post::PostResponse};
 use lemmy_utils::{location_info, LemmyError};
 use lemmy_websocket::{messages::SendPost, LemmyContext, UserOperation};
 
index 0b9d6f4a4e1d2b44e0350de6c62e768d890e959a..312010a9e88a93c915cbf22a219757609201efbe 100644 (file)
@@ -1,9 +1,9 @@
 use crate::activities::receive::get_actor_as_user;
 use activitystreams::activity::{Dislike, Like};
+use lemmy_api_structs::{blocking, post::PostResponse};
 use lemmy_db_queries::{source::post::Post_, Likeable};
 use lemmy_db_schema::source::post::{Post, PostLike};
 use lemmy_db_views::post_view::PostView;
-use lemmy_structs::{blocking, post::PostResponse};
 use lemmy_utils::LemmyError;
 use lemmy_websocket::{messages::SendPost, LemmyContext, UserOperation};
 
index 160b20ece50b6deb9007b3272a74763e98fe3525..98c25a58832b447ec273f663530b61dd54e4ff3c 100644 (file)
@@ -13,10 +13,10 @@ use activitystreams::{
   public,
 };
 use anyhow::{anyhow, Context};
+use lemmy_api_structs::{blocking, user::PrivateMessageResponse};
 use lemmy_db_queries::source::private_message::PrivateMessage_;
 use lemmy_db_schema::source::private_message::PrivateMessage;
 use lemmy_db_views::private_message_view::PrivateMessageView;
-use lemmy_structs::{blocking, user::PrivateMessageResponse};
 use lemmy_utils::{location_info, LemmyError};
 use lemmy_websocket::{messages::SendUserRoomMessage, LemmyContext, UserOperation};
 use url::Url;
index f007cda42dcff5e4374d3e538af351a25dc1bfe4..f33de2ba7300701189c6b301665fa502cc2bfc01 100644 (file)
@@ -26,9 +26,9 @@ use activitystreams::{
 };
 use anyhow::anyhow;
 use itertools::Itertools;
+use lemmy_api_structs::{blocking, WebFingerResponse};
 use lemmy_db_queries::{Crud, DbPool};
 use lemmy_db_schema::source::{comment::Comment, community::Community, post::Post, user::User_};
-use lemmy_structs::{blocking, WebFingerResponse};
 use lemmy_utils::{
   request::{retry, RecvError},
   settings::Settings,
index a574c7b85ba8e9455143a54e1a206a06b0e6cb47..3e77248f800d1163903aa930021996db47dfe4f9 100644 (file)
@@ -23,10 +23,10 @@ use activitystreams::{
 };
 use anyhow::Context;
 use itertools::Itertools;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::DbPool;
 use lemmy_db_schema::source::community::Community;
 use lemmy_db_views_actor::community_follower_view::CommunityFollowerView;
-use lemmy_structs::blocking;
 use lemmy_utils::{location_info, LemmyError};
 use lemmy_websocket::LemmyContext;
 use url::Url;
index ce74d20a5e746f5a936923c325e989312c5b719b..44f5b895f48202981604561b951e16d2db011e8e 100644 (file)
@@ -21,9 +21,9 @@ use activitystreams::{
   prelude::*,
   public,
 };
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::Crud;
 use lemmy_db_schema::source::{community::Community, post::Post, user::User_};
-use lemmy_structs::blocking;
 use lemmy_utils::LemmyError;
 use lemmy_websocket::LemmyContext;
 
index 31184a702aaf96ee6593f8334e1880eae3140b6a..322eee5f7f0f7699f33ed4decfb55b12732d6b79 100644 (file)
@@ -16,9 +16,9 @@ use activitystreams::{
   },
   prelude::*,
 };
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::Crud;
 use lemmy_db_schema::source::{private_message::PrivateMessage, user::User_};
-use lemmy_structs::blocking;
 use lemmy_utils::LemmyError;
 use lemmy_websocket::LemmyContext;
 
index 1847ec5c571ca65af8ce265db3af2e89d32c1e4d..1dc62e0bca53d9191d51f5f6bdef2fcb570f7d0c 100644 (file)
@@ -13,12 +13,12 @@ use activitystreams::{
   base::{AnyBase, BaseExt, ExtendsExt},
   object::ObjectExt,
 };
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{ApubObject, DbPool, Followable};
 use lemmy_db_schema::source::{
   community::{Community, CommunityFollower, CommunityFollowerForm},
   user::User_,
 };
-use lemmy_structs::blocking;
 use lemmy_utils::LemmyError;
 use lemmy_websocket::LemmyContext;
 use url::Url;
index cb9ec865153cf51c99538987295810e9ae28165f..fb545ed6ae2530d8ff7b11416179880c282fdb58 100644 (file)
@@ -16,9 +16,9 @@ use activitystreams::{
 };
 use anyhow::Context;
 use diesel::result::Error::NotFound;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{source::community::Community_, ApubObject, Joinable};
 use lemmy_db_schema::source::community::{Community, CommunityModerator, CommunityModeratorForm};
-use lemmy_structs::blocking;
 use lemmy_utils::{location_info, LemmyError};
 use lemmy_websocket::LemmyContext;
 use log::debug;
index df33bf74096d342279641b0b0c02130146c70ba2..6e0369bdead3cd0d0e681c04c8f203b3dfc0407e 100644 (file)
@@ -1,9 +1,9 @@
 use crate::{fetcher::fetch::fetch_remote_object, objects::FromApub, NoteExt, PageExt};
 use anyhow::anyhow;
 use diesel::result::Error::NotFound;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{ApubObject, Crud};
 use lemmy_db_schema::source::{comment::Comment, post::Post};
-use lemmy_structs::blocking;
 use lemmy_utils::LemmyError;
 use lemmy_websocket::LemmyContext;
 use log::debug;
index a831ac404028dd15eead65d0d5c0027d0d561dde..6cbc42dc69fd8aba73b8ddaebc85a631cf709a45 100644 (file)
@@ -15,6 +15,7 @@ use crate::{
 };
 use activitystreams::base::BaseExt;
 use anyhow::{anyhow, Context};
+use lemmy_api_structs::{blocking, site::SearchResponse};
 use lemmy_db_queries::{
   source::{
     comment::Comment_,
@@ -34,7 +35,6 @@ use lemmy_db_schema::source::{
 };
 use lemmy_db_views::{comment_view::CommentView, post_view::PostView};
 use lemmy_db_views_actor::{community_view::CommunityView, user_view::UserViewSafe};
-use lemmy_structs::{blocking, site::SearchResponse};
 use lemmy_utils::{settings::Settings, LemmyError};
 use lemmy_websocket::LemmyContext;
 use log::debug;
index 21cdfb3489913dde2d286f325c732a6cc24657dc..e3ef41c74ea1ebe52a8d16e5dfbf47fd72cbac5d 100644 (file)
@@ -5,9 +5,9 @@ use crate::{
 };
 use anyhow::anyhow;
 use diesel::result::Error::NotFound;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{source::user::User, ApubObject};
 use lemmy_db_schema::source::user::User_;
-use lemmy_structs::blocking;
 use lemmy_utils::LemmyError;
 use lemmy_websocket::LemmyContext;
 use log::debug;
index 44397db600b555309cadd756a32066a0803805ac..d4287224cb8fc505d92bc9b23a54c1d16f64faed 100644 (file)
@@ -4,9 +4,9 @@ use crate::{
 };
 use actix_web::{body::Body, web, web::Path, HttpResponse};
 use diesel::result::Error::NotFound;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::Crud;
 use lemmy_db_schema::source::comment::Comment;
-use lemmy_structs::blocking;
 use lemmy_utils::LemmyError;
 use lemmy_websocket::LemmyContext;
 use serde::Deserialize;
index 964ac2a15da25e874906cdae3c8a490f8ea1770c..2306286a7d0dc8e8318114586784a1b1131a17dc 100644 (file)
@@ -9,10 +9,10 @@ use activitystreams::{
   collection::{CollectionExt, OrderedCollection, UnorderedCollection},
 };
 use actix_web::{body::Body, web, HttpResponse};
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::source::{activity::Activity_, community::Community_};
 use lemmy_db_schema::source::{activity::Activity, community::Community};
 use lemmy_db_views_actor::community_follower_view::CommunityFollowerView;
-use lemmy_structs::blocking;
 use lemmy_utils::LemmyError;
 use lemmy_websocket::LemmyContext;
 use serde::Deserialize;
index f0ffbcb1e1ca90e99f84a5f5dfcc1e94f64e88ec..ae8a3632aa59310b23732b0383b6f1b189a74a9d 100644 (file)
@@ -1,9 +1,9 @@
 use crate::APUB_JSON_CONTENT_TYPE;
 use actix_web::{body::Body, web, HttpResponse};
 use http::StatusCode;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::source::activity::Activity_;
 use lemmy_db_schema::source::activity::Activity;
-use lemmy_structs::blocking;
 use lemmy_utils::{settings::Settings, LemmyError};
 use lemmy_websocket::LemmyContext;
 use serde::{Deserialize, Serialize};
index 66adae3ac2b41f58deca69364636770fb548ef6e..8bdded2a0849a8a7a80092013508ac41a0dce6cd 100644 (file)
@@ -4,9 +4,9 @@ use crate::{
 };
 use actix_web::{body::Body, web, HttpResponse};
 use diesel::result::Error::NotFound;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::Crud;
 use lemmy_db_schema::source::post::Post;
-use lemmy_structs::blocking;
 use lemmy_utils::LemmyError;
 use lemmy_websocket::LemmyContext;
 use serde::Deserialize;
index 7c7653e575e9be4869a15f972b1db2475000fc50..77c40d855d9a66f8cd8b07911216d9213643f98b 100644 (file)
@@ -9,9 +9,9 @@ use activitystreams::{
   collection::{CollectionExt, OrderedCollection},
 };
 use actix_web::{body::Body, web, HttpResponse};
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::source::user::User;
 use lemmy_db_schema::source::user::User_;
-use lemmy_structs::blocking;
 use lemmy_utils::LemmyError;
 use lemmy_websocket::LemmyContext;
 use serde::Deserialize;
index f9056a770b2777c10e68660e25728da1a5f09348..f003fb16fecff1110957c5e796714c09a9e91a4d 100644 (file)
@@ -26,13 +26,13 @@ use activitystreams::{
 };
 use actix_web::{web, HttpRequest, HttpResponse};
 use anyhow::{anyhow, Context};
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{source::community::Community_, ApubObject, DbPool, Followable};
 use lemmy_db_schema::source::{
   community::{Community, CommunityFollower, CommunityFollowerForm},
   user::User_,
 };
 use lemmy_db_views_actor::community_user_ban_view::CommunityUserBanView;
-use lemmy_structs::blocking;
 use lemmy_utils::{location_info, LemmyError};
 use lemmy_websocket::LemmyContext;
 use log::info;
index 765d5dff46d22aa34facb69bd23121e6edfb36c3..4f5b04633c9de00596ada84e22b699e2ad20d6b8 100644 (file)
@@ -12,13 +12,13 @@ use activitystreams::{
 };
 use actix_web::HttpRequest;
 use anyhow::{anyhow, Context};
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{
   source::{activity::Activity_, community::Community_},
   ApubObject,
   DbPool,
 };
 use lemmy_db_schema::source::{activity::Activity, community::Community, user::User_};
-use lemmy_structs::blocking;
 use lemmy_utils::{location_info, settings::Settings, LemmyError};
 use lemmy_websocket::LemmyContext;
 use serde::Serialize;
index 6c087fc80b3e90f737cf676139b3618d045d93e1..9f8a6d6c1fd87e3af8a5e8035308018bd95b4ff1 100644 (file)
@@ -43,9 +43,9 @@ use activitystreams::{
 };
 use anyhow::Context;
 use diesel::result::Error::NotFound;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::Crud;
 use lemmy_db_schema::source::site::Site;
-use lemmy_structs::blocking;
 use lemmy_utils::{location_info, LemmyError};
 use lemmy_websocket::LemmyContext;
 use strum_macros::EnumString;
index 93df6e7284fda380b91f9cad13f2892374772582..8c197a85f6eea95a8b32dd46df869c9f5f07a105 100644 (file)
@@ -15,9 +15,9 @@ use crate::{
 use activitystreams::{activity::ActorAndObject, prelude::*};
 use actix_web::{web, HttpRequest, HttpResponse};
 use anyhow::Context;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{ApubObject, DbPool};
 use lemmy_db_schema::source::community::Community;
-use lemmy_structs::blocking;
 use lemmy_utils::{location_info, LemmyError};
 use lemmy_websocket::LemmyContext;
 use serde::{Deserialize, Serialize};
index 5657faf1e0526896071a93584740d0acbe20f050..467bee77c0e7f7ea1342abbed39e3ad459a0a1d9 100644 (file)
@@ -48,13 +48,13 @@ use activitystreams::{
 use actix_web::{web, HttpRequest, HttpResponse};
 use anyhow::{anyhow, Context};
 use diesel::NotFound;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{source::user::User, ApubObject, Followable};
 use lemmy_db_schema::source::{
   community::{Community, CommunityFollower},
   private_message::PrivateMessage,
   user::User_,
 };
-use lemmy_structs::blocking;
 use lemmy_utils::{location_info, LemmyError};
 use lemmy_websocket::LemmyContext;
 use log::debug;
index 388d57e6a9b5f3292e973e5e14a23464dc280479..c010a29bdf83c75c1c4de7d08559801434e4f426 100644 (file)
@@ -24,6 +24,7 @@ use activitystreams::{
 use activitystreams_ext::{Ext1, Ext2};
 use anyhow::{anyhow, Context};
 use diesel::NotFound;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{source::activity::Activity_, ApubObject, DbPool};
 use lemmy_db_schema::source::{
   activity::Activity,
@@ -33,7 +34,6 @@ use lemmy_db_schema::source::{
   private_message::PrivateMessage,
   user::User_,
 };
-use lemmy_structs::blocking;
 use lemmy_utils::{location_info, settings::Settings, LemmyError};
 use lemmy_websocket::LemmyContext;
 use serde::Serialize;
index 8452f3787304676b9a68591171b62ce7c201cf5d..6c218190ab6061e00ba6e84a715c507575dbd2dd 100644 (file)
@@ -21,13 +21,13 @@ use activitystreams::{
   public,
 };
 use anyhow::{anyhow, Context};
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{Crud, DbPool};
 use lemmy_db_schema::source::{
   comment::{Comment, CommentForm},
   post::Post,
   user::User_,
 };
-use lemmy_structs::blocking;
 use lemmy_utils::{
   location_info,
   utils::{convert_datetime, remove_slurs},
index 827eae294607011306d7680aa708b9a5cd6407e9..f516768ba037a995722508153ee5c7d3708e1ee2 100644 (file)
@@ -22,13 +22,13 @@ use activitystreams::{
 };
 use activitystreams_ext::Ext2;
 use anyhow::Context;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::DbPool;
 use lemmy_db_schema::{
   naive_now,
   source::community::{Community, CommunityForm},
 };
 use lemmy_db_views_actor::community_moderator_view::CommunityModeratorView;
-use lemmy_structs::blocking;
 use lemmy_utils::{
   location_info,
   utils::{check_slurs, check_slurs_opt, convert_datetime},
index a35ad7d1370517eb6b51be15b33b6881664a7ada..42e8bb6285cce1086510ded20d084fcb4cd59a00 100644 (file)
@@ -12,9 +12,9 @@ use activitystreams::{
 use anyhow::{anyhow, Context};
 use chrono::NaiveDateTime;
 use diesel::result::Error::NotFound;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{ApubObject, Crud, DbPool};
 use lemmy_db_schema::source::community::Community;
-use lemmy_structs::blocking;
 use lemmy_utils::{
   location_info,
   settings::Settings,
index 2cac67ea494d0156f87fd84297e6d7b679b340bd..841b3806925392d1f3782012a8cb6297c578a738 100644 (file)
@@ -22,13 +22,13 @@ use activitystreams::{
 };
 use activitystreams_ext::Ext1;
 use anyhow::Context;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{Crud, DbPool};
 use lemmy_db_schema::source::{
   community::Community,
   post::{Post, PostForm},
   user::User_,
 };
-use lemmy_structs::blocking;
 use lemmy_utils::{
   location_info,
   request::fetch_iframely_and_pictrs_data,
index df91b03f0ebdf1ab49c0bfee2956ba7f26bb0b73..0bb753e2801200a3ae3b94b5e95f308133638611 100644 (file)
@@ -19,12 +19,12 @@ use activitystreams::{
   prelude::*,
 };
 use anyhow::Context;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{Crud, DbPool};
 use lemmy_db_schema::source::{
   private_message::{PrivateMessage, PrivateMessageForm},
   user::User_,
 };
-use lemmy_structs::blocking;
 use lemmy_utils::{location_info, utils::convert_datetime, LemmyError};
 use lemmy_websocket::LemmyContext;
 use url::Url;
index 7a85b20a9369ac21c04970fb8c2473ec2d5707f6..aad89567404bad9006ac96844bc16ec8c3de71b4 100644 (file)
@@ -18,12 +18,12 @@ use activitystreams::{
 };
 use activitystreams_ext::Ext1;
 use anyhow::Context;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{ApubObject, DbPool};
 use lemmy_db_schema::{
   naive_now,
   source::user::{UserForm, User_},
 };
-use lemmy_structs::blocking;
 use lemmy_utils::{
   location_info,
   settings::Settings,
index b71ffca7037faf4d6275271d5ad9b6dfdaa2669d..80b94aa7e86d93270fe7b7aaf88f869a305d7abe 100644 (file)
@@ -13,7 +13,7 @@ lemmy_db_queries = { path = "../db_queries" }
 lemmy_db_views = { path = "../db_views" }
 lemmy_db_views_actor = { path = "../db_views_actor" }
 lemmy_db_schema = { path = "../db_schema" }
-lemmy_structs = { path = "../structs" }
+lemmy_api_structs = { path = "../api_structs" }
 diesel = "1.4.5"
 actix = "0.10.0"
 actix-web = { version = "3.3.2", default-features = false, features = ["rustls"] }
index 837e1489afebeb91b826fb1e7c4bdcbf3835c23e..b8858f3f9ed54e4f8c5eb053a4feac47dd3c3db3 100644 (file)
@@ -2,6 +2,7 @@ use actix_web::{error::ErrorBadRequest, *};
 use anyhow::anyhow;
 use chrono::{DateTime, NaiveDateTime, Utc};
 use diesel::PgConnection;
+use lemmy_api_structs::blocking;
 use lemmy_db_queries::{
   source::{community::Community_, user::User},
   ListingType,
@@ -14,7 +15,6 @@ use lemmy_db_views::{
   site_view::SiteView,
 };
 use lemmy_db_views_actor::user_mention_view::{UserMentionQueryBuilder, UserMentionView};
-use lemmy_structs::blocking;
 use lemmy_utils::{claims::Claims, settings::Settings, utils::markdown_to_html, LemmyError};
 use lemmy_websocket::LemmyContext;
 use rss::{
index 46ef7ce4dfec70ff9acee6861e201b814cc83484..058ba8816e1e63527763c92d8ee09dfe28b020d7 100644 (file)
@@ -1,7 +1,7 @@
 use actix_web::{body::Body, error::ErrorBadRequest, *};
 use anyhow::anyhow;
+use lemmy_api_structs::blocking;
 use lemmy_db_views::site_view::SiteView;
-use lemmy_structs::blocking;
 use lemmy_utils::{settings::Settings, version, LemmyError};
 use lemmy_websocket::LemmyContext;
 use serde::{Deserialize, Serialize};
index 4059e0f893d0491e774c22fa4d76e9f0c87df70b..5c5387d58451a438116e5101bd6ec0f9c6dfff76 100644 (file)
@@ -1,8 +1,8 @@
 use actix_web::{error::ErrorBadRequest, web::Query, *};
 use anyhow::anyhow;
+use lemmy_api_structs::{blocking, WebFingerLink, WebFingerResponse};
 use lemmy_db_queries::source::{community::Community_, user::User};
 use lemmy_db_schema::source::{community::Community, user::User_};
-use lemmy_structs::{blocking, WebFingerLink, WebFingerResponse};
 use lemmy_utils::{
   settings::Settings,
   LemmyError,
index 3116d71e75f13921e4420724f942d59de8ac1c9a..b957e944650338d1aa0ab3a040d10b7672a65f44 100644 (file)
@@ -1,7 +1,6 @@
 [package]
 name = "lemmy_websocket"
 version = "0.1.0"
-authors = ["Felix Ableitner <me@nutomic.com>"]
 edition = "2018"
 
 [lib]
@@ -11,7 +10,7 @@ doctest = false
 
 [dependencies]
 lemmy_utils = { path = "../utils" }
-lemmy_structs = { path = "../structs" }
+lemmy_api_structs = { path = "../api_structs" }
 lemmy_db_queries = { path = "../db_queries" }
 lemmy_db_schema = { path = "../db_schema" }
 reqwest = { version = "0.10.10", features = ["json"] }
index fa1d90185c344c2a22dbeff2eecede702a029563..9978d1ec6062d2548815e90ca506a1b42052e8f9 100644 (file)
@@ -6,7 +6,7 @@ use diesel::{
   r2d2::{ConnectionManager, Pool},
   PgConnection,
 };
-use lemmy_structs::{comment::*, post::*};
+use lemmy_api_structs::{comment::*, post::*};
 use lemmy_utils::{
   location_info,
   rate_limit::RateLimit,
index 4349b01b6e30eae96fa7bf421d29ecae648491e5..89f3f2b3e6f31643c2666ec847df9cac8fc9979b 100644 (file)
@@ -1,6 +1,6 @@
 use crate::UserOperation;
 use actix::{prelude::*, Recipient};
-use lemmy_structs::{comment::CommentResponse, post::PostResponse};
+use lemmy_api_structs::{comment::CommentResponse, post::PostResponse};
 use lemmy_utils::{CommunityId, ConnectionId, IpAddr, PostId, UserId};
 use serde::{Deserialize, Serialize};
 
index 4ebedb4f849f41cb6c46e430808cead6f9aaf10d..a18201c73f43307134f6df16336238a4f879fe8e 100644 (file)
@@ -8,11 +8,11 @@ use diesel::{
   PgConnection,
 };
 use lemmy_api::match_websocket_operation;
+use lemmy_api_structs::blocking;
 use lemmy_apub::activity_queue::create_activity_queue;
 use lemmy_db_queries::get_database_url_from_env;
 use lemmy_routes::{feeds, images, nodeinfo, webfinger};
 use lemmy_server::{code_migrations::run_advanced_migrations, scheduled_tasks};
-use lemmy_structs::blocking;
 use lemmy_utils::{
   rate_limit::{rate_limiter::RateLimiter, RateLimit},
   settings::Settings,