]> Untitled Git - lemmy.git/commitdiff
Running cargo fmt.
authorDessalines <tyhou13@gmx.com>
Wed, 16 Sep 2020 13:31:30 +0000 (08:31 -0500)
committerDessalines <tyhou13@gmx.com>
Wed, 16 Sep 2020 13:31:30 +0000 (08:31 -0500)
29 files changed:
src/api/comment.rs
src/api/community.rs
src/api/mod.rs
src/api/post.rs
src/api/site.rs
src/api/user.rs
src/apub/comment.rs
src/apub/community.rs
src/apub/fetcher.rs
src/apub/inbox/activities/create.rs
src/apub/inbox/activities/delete.rs
src/apub/inbox/activities/dislike.rs
src/apub/inbox/activities/like.rs
src/apub/inbox/activities/remove.rs
src/apub/inbox/activities/undo.rs
src/apub/inbox/activities/update.rs
src/apub/inbox/community_inbox.rs
src/apub/inbox/user_inbox.rs
src/apub/mod.rs
src/apub/post.rs
src/apub/private_message.rs
src/apub/user.rs
src/main.rs
src/routes/api.rs
src/routes/feeds.rs
src/routes/nodeinfo.rs
src/routes/webfinger.rs
src/websocket/chat_server.rs
src/websocket/handlers.rs

index 2f6a23b682c3d6b976e151a8adde64863dfe63b8..69853c3e7e1bc37e4533b4b391599e47240e543b 100644 (file)
@@ -11,12 +11,6 @@ use crate::{
   LemmyContext,
 };
 use actix_web::web::Data;
-use lemmy_structs::{
-  blocking,
-  comment::*,
-  send_local_notifs,
-  websocket::{SendComment, UserOperation},
-};
 use lemmy_db::{
   comment::*,
   comment_view::*,
@@ -30,6 +24,12 @@ use lemmy_db::{
   Saveable,
   SortType,
 };
+use lemmy_structs::{
+  blocking,
+  comment::*,
+  send_local_notifs,
+  websocket::{SendComment, UserOperation},
+};
 use lemmy_utils::{
   apub::{make_apub_endpoint, EndpointType},
   utils::{remove_slurs, scrape_text_for_mentions},
index e16e7f717bb38de745ed60f054fd0c0ad6cd3ad6..77a945a644a7c5c1df96e4d8cf6a8b35aa4f42d5 100644 (file)
@@ -5,16 +5,6 @@ use crate::{
 };
 use actix_web::web::Data;
 use anyhow::Context;
-use lemmy_structs::{
-  blocking,
-  community::*,
-  websocket::{
-    GetCommunityUsersOnline,
-    JoinCommunityRoom,
-    SendCommunityRoomMessage,
-    UserOperation,
-  },
-};
 use lemmy_db::{
   comment::Comment,
   comment_view::CommentQueryBuilder,
@@ -32,6 +22,16 @@ use lemmy_db::{
   Joinable,
   SortType,
 };
+use lemmy_structs::{
+  blocking,
+  community::*,
+  websocket::{
+    GetCommunityUsersOnline,
+    JoinCommunityRoom,
+    SendCommunityRoomMessage,
+    UserOperation,
+  },
+};
 use lemmy_utils::{
   apub::{generate_actor_keypair, make_apub_endpoint, EndpointType},
   location_info,
index 0c66e7d7150a6ed89a77cc789532493dc3ec448b..d63f38eb8d5db7af5dec92df1467ddd0192ed1f6 100644 (file)
@@ -1,6 +1,5 @@
 use crate::{api::claims::Claims, DbPool, LemmyContext};
 use actix_web::web::Data;
-use lemmy_structs::blocking;
 use lemmy_db::{
   community::Community,
   community_view::CommunityUserBanView,
@@ -8,6 +7,7 @@ use lemmy_db::{
   user::User_,
   Crud,
 };
+use lemmy_structs::blocking;
 use lemmy_utils::{APIError, ConnectionId, LemmyError};
 
 pub mod claims;
index 4cfb3babda1b0b2cfbf8f879af2d2344ac38630f..ef5409d1f604cf2fa903915f17f956f309c62834 100644 (file)
@@ -5,11 +5,6 @@ use crate::{
   LemmyContext,
 };
 use actix_web::web::Data;
-use lemmy_structs::{
-  blocking,
-  post::*,
-  websocket::{GetPostUsersOnline, JoinPostRoom, SendPost, UserOperation},
-};
 use lemmy_db::{
   comment_view::*,
   community_view::*,
@@ -24,6 +19,11 @@ use lemmy_db::{
   Saveable,
   SortType,
 };
+use lemmy_structs::{
+  blocking,
+  post::*,
+  websocket::{GetPostUsersOnline, JoinPostRoom, SendPost, UserOperation},
+};
 use lemmy_utils::{
   apub::{make_apub_endpoint, EndpointType},
   utils::{check_slurs, check_slurs_opt, is_valid_post_title},
index 4d6438a15fa8b57b51f683e907aea0ccadf75578..3ff1e49d0c3437436ec456edd637bccbce768d04 100644 (file)
@@ -6,12 +6,6 @@ use crate::{
 };
 use actix_web::web::Data;
 use anyhow::Context;
-use lemmy_structs::{
-  blocking,
-  site::*,
-  user::Register,
-  websocket::{GetUsersOnline, SendAllMessage, UserOperation},
-};
 use lemmy_db::{
   category::*,
   comment_view::*,
@@ -28,6 +22,12 @@ use lemmy_db::{
   SearchType,
   SortType,
 };
+use lemmy_structs::{
+  blocking,
+  site::*,
+  user::Register,
+  websocket::{GetUsersOnline, SendAllMessage, UserOperation},
+};
 use lemmy_utils::{
   location_info,
   settings::Settings,
index 3301be9dcbf543f725b28629a60337ee97917458..630f816deaa3e3bc94862e99b9de073cebaf2306 100644 (file)
@@ -9,18 +9,6 @@ use anyhow::Context;
 use bcrypt::verify;
 use captcha::{gen, Difficulty};
 use chrono::Duration;
-use lemmy_structs::{
-  blocking,
-  user::*,
-  websocket::{
-    CaptchaItem,
-    CheckCaptcha,
-    JoinUserRoom,
-    SendAllMessage,
-    SendUserRoomMessage,
-    UserOperation,
-  },
-};
 use lemmy_db::{
   comment::*,
   comment_view::*,
@@ -46,6 +34,18 @@ use lemmy_db::{
   ListingType,
   SortType,
 };
+use lemmy_structs::{
+  blocking,
+  user::*,
+  websocket::{
+    CaptchaItem,
+    CheckCaptcha,
+    JoinUserRoom,
+    SendAllMessage,
+    SendUserRoomMessage,
+    UserOperation,
+  },
+};
 use lemmy_utils::{
   apub::{generate_actor_keypair, make_apub_endpoint, EndpointType},
   email::send_email,
index e71eeacde9702f0a9975e8874fb84d9385b73d4b..fc19ec334d697087ad677168fb88b9e0acabf9b4 100644 (file)
@@ -40,7 +40,6 @@ use activitystreams::{
 use actix_web::{body::Body, web, web::Path, HttpResponse};
 use anyhow::Context;
 use itertools::Itertools;
-use lemmy_structs::blocking;
 use lemmy_db::{
   comment::{Comment, CommentForm},
   community::Community,
@@ -48,6 +47,7 @@ use lemmy_db::{
   user::User_,
   Crud,
 };
+use lemmy_structs::blocking;
 use lemmy_utils::{
   location_info,
   utils::{convert_datetime, remove_slurs, scrape_text_for_mentions, MentionData},
index 8a11f570233d7b3c7f2ee3badefd27ef920aa5ba..54b2957ed1138281729643a37e0ffb5702131cad 100644 (file)
@@ -38,7 +38,6 @@ use activitystreams_ext::Ext2;
 use actix_web::{body::Body, web, HttpResponse};
 use anyhow::Context;
 use itertools::Itertools;
-use lemmy_structs::blocking;
 use lemmy_db::{
   community::{Community, CommunityForm},
   community_view::{CommunityFollowerView, CommunityModeratorView},
@@ -46,6 +45,7 @@ use lemmy_db::{
   post::Post,
   user::User_,
 };
+use lemmy_structs::blocking;
 use lemmy_utils::{
   apub::get_apub_protocol_string,
   location_info,
index c1caa039b6f75a9b494b0c99383f709992b82ddd..5d772f062b66c271ce53b282d8b30d86c2911c9c 100644 (file)
@@ -15,7 +15,6 @@ use activitystreams::{base::BaseExt, collection::OrderedCollection, object::Note
 use anyhow::{anyhow, Context};
 use chrono::NaiveDateTime;
 use diesel::result::Error::NotFound;
-use lemmy_structs::{blocking, site::SearchResponse};
 use lemmy_db::{
   comment::{Comment, CommentForm},
   comment_view::CommentView,
@@ -30,6 +29,7 @@ use lemmy_db::{
   Joinable,
   SearchType,
 };
+use lemmy_structs::{blocking, site::SearchResponse};
 use lemmy_utils::{apub::get_apub_protocol_string, location_info, LemmyError};
 use log::debug;
 use reqwest::Client;
index d54834e176dd93a5a80ceecbc63419461c34eed0..961991a651de9781a46b303219b41342f4cb364a 100644 (file)
@@ -14,6 +14,12 @@ use crate::{
 use activitystreams::{activity::Create, base::AnyBase, object::Note, prelude::*};
 use actix_web::HttpResponse;
 use anyhow::Context;
+use lemmy_db::{
+  comment::{Comment, CommentForm},
+  comment_view::CommentView,
+  post::{Post, PostForm},
+  post_view::PostView,
+};
 use lemmy_structs::{
   blocking,
   comment::CommentResponse,
@@ -21,12 +27,6 @@ use lemmy_structs::{
   send_local_notifs,
   websocket::{SendComment, SendPost, UserOperation},
 };
-use lemmy_db::{
-  comment::{Comment, CommentForm},
-  comment_view::CommentView,
-  post::{Post, PostForm},
-  post_view::PostView,
-};
 use lemmy_utils::{location_info, utils::scrape_text_for_mentions, LemmyError};
 
 pub async fn receive_create(
index 41615132a84ece093b575ff836219ec13e8ef1cb..131588bace0d7ef2255d76300313b30aedad741a 100644 (file)
@@ -16,13 +16,6 @@ use crate::{
 use activitystreams::{activity::Delete, base::AnyBase, object::Note, prelude::*};
 use actix_web::HttpResponse;
 use anyhow::Context;
-use lemmy_structs::{
-  blocking,
-  comment::CommentResponse,
-  community::CommunityResponse,
-  post::PostResponse,
-  websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
-};
 use lemmy_db::{
   comment::{Comment, CommentForm},
   comment_view::CommentView,
@@ -33,6 +26,13 @@ use lemmy_db::{
   post_view::PostView,
   Crud,
 };
+use lemmy_structs::{
+  blocking,
+  comment::CommentResponse,
+  community::CommunityResponse,
+  post::PostResponse,
+  websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
+};
 use lemmy_utils::{location_info, LemmyError};
 
 pub async fn receive_delete(
index 07bf081503a6c2e3ffeb49daac1ece5cbd47be1a..df9bd848663c9c81aca2f365b76193e9d148a1f4 100644 (file)
@@ -14,12 +14,6 @@ use crate::{
 use activitystreams::{activity::Dislike, base::AnyBase, object::Note, prelude::*};
 use actix_web::HttpResponse;
 use anyhow::Context;
-use lemmy_structs::{
-  blocking,
-  comment::CommentResponse,
-  post::PostResponse,
-  websocket::{SendComment, SendPost, UserOperation},
-};
 use lemmy_db::{
   comment::{CommentForm, CommentLike, CommentLikeForm},
   comment_view::CommentView,
@@ -27,6 +21,12 @@ use lemmy_db::{
   post_view::PostView,
   Likeable,
 };
+use lemmy_structs::{
+  blocking,
+  comment::CommentResponse,
+  post::PostResponse,
+  websocket::{SendComment, SendPost, UserOperation},
+};
 use lemmy_utils::{location_info, LemmyError};
 
 pub async fn receive_dislike(
index dbb6363daad9198da0625dddaad89a39830480e7..ce067c87990ae0271119abe923f6c3f544b47146 100644 (file)
@@ -14,12 +14,6 @@ use crate::{
 use activitystreams::{activity::Like, base::AnyBase, object::Note, prelude::*};
 use actix_web::HttpResponse;
 use anyhow::Context;
-use lemmy_structs::{
-  blocking,
-  comment::CommentResponse,
-  post::PostResponse,
-  websocket::{SendComment, SendPost, UserOperation},
-};
 use lemmy_db::{
   comment::{CommentForm, CommentLike, CommentLikeForm},
   comment_view::CommentView,
@@ -27,6 +21,12 @@ use lemmy_db::{
   post_view::PostView,
   Likeable,
 };
+use lemmy_structs::{
+  blocking,
+  comment::CommentResponse,
+  post::PostResponse,
+  websocket::{SendComment, SendPost, UserOperation},
+};
 use lemmy_utils::{location_info, LemmyError};
 
 pub async fn receive_like(
index 3299d5cfad7cf774ee17555013d8bde9de055d5e..e91a65c038a84557c1b69847cf39ec5694d63cad 100644 (file)
@@ -17,13 +17,6 @@ use crate::{
 use activitystreams::{activity::Remove, base::AnyBase, object::Note, prelude::*};
 use actix_web::HttpResponse;
 use anyhow::{anyhow, Context};
-use lemmy_structs::{
-  blocking,
-  comment::CommentResponse,
-  community::CommunityResponse,
-  post::PostResponse,
-  websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
-};
 use lemmy_db::{
   comment::{Comment, CommentForm},
   comment_view::CommentView,
@@ -34,6 +27,13 @@ use lemmy_db::{
   post_view::PostView,
   Crud,
 };
+use lemmy_structs::{
+  blocking,
+  comment::CommentResponse,
+  community::CommunityResponse,
+  post::PostResponse,
+  websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
+};
 use lemmy_utils::{location_info, LemmyError};
 
 pub async fn receive_remove(
index c3dad4208c632a4e88304161f93a3e93a1612bac..c8b4d35bf4bfd6a72fa9a0a9df27c46055325383 100644 (file)
@@ -21,13 +21,6 @@ use activitystreams::{
 };
 use actix_web::HttpResponse;
 use anyhow::{anyhow, Context};
-use lemmy_structs::{
-  blocking,
-  comment::CommentResponse,
-  community::CommunityResponse,
-  post::PostResponse,
-  websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
-};
 use lemmy_db::{
   comment::{Comment, CommentForm, CommentLike},
   comment_view::CommentView,
@@ -39,6 +32,13 @@ use lemmy_db::{
   Crud,
   Likeable,
 };
+use lemmy_structs::{
+  blocking,
+  comment::CommentResponse,
+  community::CommunityResponse,
+  post::PostResponse,
+  websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
+};
 use lemmy_utils::{location_info, LemmyError};
 
 pub async fn receive_undo(
index 137dc0615934e8f5663bf8ee050a24613f7b9476..ccf7534bcc481905553d2969b5ae687186fa925b 100644 (file)
@@ -15,13 +15,6 @@ use crate::{
 use activitystreams::{activity::Update, base::AnyBase, object::Note, prelude::*};
 use actix_web::HttpResponse;
 use anyhow::Context;
-use lemmy_structs::{
-  blocking,
-  comment::CommentResponse,
-  post::PostResponse,
-  send_local_notifs,
-  websocket::{SendComment, SendPost, UserOperation},
-};
 use lemmy_db::{
   comment::{Comment, CommentForm},
   comment_view::CommentView,
@@ -29,6 +22,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_utils::{location_info, utils::scrape_text_for_mentions, LemmyError};
 
 pub async fn receive_update(
index e60c3fe7a85e35bf546c708fce19213e919a6629..9dd010c3f09896e8286ff1b998b281ab0f5fa788 100644 (file)
@@ -15,12 +15,12 @@ use activitystreams::{
 };
 use actix_web::{web, HttpRequest, HttpResponse};
 use anyhow::{anyhow, Context};
-use lemmy_structs::blocking;
 use lemmy_db::{
   community::{Community, CommunityFollower, CommunityFollowerForm},
   user::User_,
   Followable,
 };
+use lemmy_structs::blocking;
 use lemmy_utils::{location_info, LemmyError};
 use log::debug;
 use serde::{Deserialize, Serialize};
index cf47a597cb0d14f7ae0219653b224c271532615f..5cbbedb6b9d88165b61d14f22a20e1638ab90c4c 100644 (file)
@@ -16,11 +16,6 @@ use activitystreams::{
 };
 use actix_web::{web, HttpRequest, HttpResponse};
 use anyhow::Context;
-use lemmy_structs::{
-  blocking,
-  user::PrivateMessageResponse,
-  websocket::{SendUserRoomMessage, UserOperation},
-};
 use lemmy_db::{
   community::{CommunityFollower, CommunityFollowerForm},
   naive_now,
@@ -30,6 +25,11 @@ use lemmy_db::{
   Crud,
   Followable,
 };
+use lemmy_structs::{
+  blocking,
+  user::PrivateMessageResponse,
+  websocket::{SendUserRoomMessage, UserOperation},
+};
 use lemmy_utils::{location_info, LemmyError};
 use log::debug;
 use serde::{Deserialize, Serialize};
index db489622f4ef5f864b81a4b21a7a6d71068ea24c..5fd5da36409426c37dfa8d1b523dd746f3fa35a3 100644 (file)
@@ -32,8 +32,8 @@ use activitystreams_ext::{Ext1, Ext2};
 use actix_web::{body::Body, HttpResponse};
 use anyhow::{anyhow, Context};
 use chrono::NaiveDateTime;
-use lemmy_structs::blocking;
 use lemmy_db::{activity::do_insert_activity, user::User_};
+use lemmy_structs::blocking;
 use lemmy_utils::{
   apub::get_apub_protocol_string,
   location_info,
index d2fa7dc5952fe7903feac9bac0096b38e7006a62..85e00fb231c05538a4ae5f00f6a9a32bce99dfb5 100644 (file)
@@ -35,13 +35,13 @@ use activitystreams::{
 use activitystreams_ext::Ext1;
 use actix_web::{body::Body, web, HttpResponse};
 use anyhow::Context;
-use lemmy_structs::blocking;
 use lemmy_db::{
   community::Community,
   post::{Post, PostForm},
   user::User_,
   Crud,
 };
+use lemmy_structs::blocking;
 use lemmy_utils::{
   location_info,
   utils::{check_slurs, convert_datetime, remove_slurs},
index 00196bfd789f30a35c939b8dbd2abb2c4e2e50c8..9e0549eeb43f840c45d3cfad512e7aab480f0de5 100644 (file)
@@ -27,12 +27,12 @@ use activitystreams::{
   prelude::*,
 };
 use anyhow::Context;
-use lemmy_structs::blocking;
 use lemmy_db::{
   private_message::{PrivateMessage, PrivateMessageForm},
   user::User_,
   Crud,
 };
+use lemmy_structs::blocking;
 use lemmy_utils::{location_info, utils::convert_datetime, LemmyError};
 use url::Url;
 
index 5bd6d2579cbc0d113b5e6e4d41e14a23f0656b0e..fb650632e9cd6f4bb7f90758c14335ca09cd6d01 100644 (file)
@@ -27,11 +27,11 @@ use activitystreams::{
 use activitystreams_ext::Ext1;
 use actix_web::{body::Body, web, HttpResponse};
 use anyhow::Context;
-use lemmy_structs::blocking;
 use lemmy_db::{
   naive_now,
   user::{UserForm, User_},
 };
+use lemmy_structs::blocking;
 use lemmy_utils::{
   location_info,
   utils::{check_slurs, check_slurs_opt, convert_datetime},
index 39ab014de9875e77831794e5774c45f3c367731b..800196cfe9204260471f0b1f1e0db260b27a4da5 100644 (file)
@@ -16,7 +16,6 @@ use diesel::{
   PgConnection,
 };
 use lazy_static::lazy_static;
-use lemmy_structs::blocking;
 use lemmy_db::get_database_url_from_env;
 use lemmy_rate_limit::{rate_limiter::RateLimiter, RateLimit};
 use lemmy_server::{
@@ -26,6 +25,7 @@ use lemmy_server::{
   websocket::chat_server::ChatServer,
   LemmyContext,
 };
+use lemmy_structs::blocking;
 use lemmy_utils::{settings::Settings, LemmyError, CACHE_CONTROL_REGEX};
 use reqwest::Client;
 use std::sync::Arc;
index fffb7cdf06dc2bd2fa50e400a21983f9127725ca..7e019168b5251f18c3ceb60807a92237d8c07d04 100644 (file)
@@ -1,7 +1,7 @@
 use crate::{api::Perform, LemmyContext};
 use actix_web::{error::ErrorBadRequest, *};
-use lemmy_structs::{comment::*, community::*, post::*, site::*, user::*};
 use lemmy_rate_limit::RateLimit;
+use lemmy_structs::{comment::*, community::*, post::*, site::*, user::*};
 use serde::Deserialize;
 
 pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimit) {
index c73b8e0518b2cef3c541aaac7bd1608eb8746352..9669bfcc0523c9650d9f3a416ad0ec5165521b1e 100644 (file)
@@ -3,7 +3,6 @@ use actix_web::{error::ErrorBadRequest, *};
 use anyhow::anyhow;
 use chrono::{DateTime, NaiveDateTime, Utc};
 use diesel::PgConnection;
-use lemmy_structs::blocking;
 use lemmy_db::{
   comment_view::{ReplyQueryBuilder, ReplyView},
   community::Community,
@@ -14,6 +13,7 @@ use lemmy_db::{
   ListingType,
   SortType,
 };
+use lemmy_structs::blocking;
 use lemmy_utils::{settings::Settings, utils::markdown_to_html, LemmyError};
 use rss::{CategoryBuilder, ChannelBuilder, GuidBuilder, Item, ItemBuilder};
 use serde::Deserialize;
index 20e55cca7f2bc6b40bfb8327c0d7144fc2bee2e8..15c5a23575c3b5a87be8e25f4d692cf9ee3599aa 100644 (file)
@@ -1,8 +1,8 @@
 use crate::{version, LemmyContext};
 use actix_web::{body::Body, error::ErrorBadRequest, *};
 use anyhow::anyhow;
-use lemmy_structs::blocking;
 use lemmy_db::site_view::SiteView;
+use lemmy_structs::blocking;
 use lemmy_utils::{apub::get_apub_protocol_string, settings::Settings, LemmyError};
 use serde::{Deserialize, Serialize};
 use url::Url;
index 1ea38867f490fdbe3e795463d0a45438df361780..53a87b124df6c85b3ebdd6b1e05cac845a73e953 100644 (file)
@@ -1,8 +1,8 @@
 use crate::LemmyContext;
 use actix_web::{error::ErrorBadRequest, web::Query, *};
 use anyhow::anyhow;
-use lemmy_structs::blocking;
 use lemmy_db::{community::Community, user::User_};
+use lemmy_structs::blocking;
 use lemmy_utils::{
   settings::Settings,
   LemmyError,
index 13106d9d2e892e62910d76f56f7901097fc53fd4..0c4dfb0ba1e5075cec35d9062cf17dd64e9c2fdb 100644 (file)
@@ -9,8 +9,8 @@ use diesel::{
   r2d2::{ConnectionManager, Pool},
   PgConnection,
 };
-use lemmy_structs::{comment::*, community::*, post::*, site::*, user::*, websocket::*};
 use lemmy_rate_limit::RateLimit;
+use lemmy_structs::{comment::*, community::*, post::*, site::*, user::*, websocket::*};
 use lemmy_utils::{
   location_info,
   APIError,
index b3c8d5410a29417fa5660c95339ca182efe5d402..75e638f94e34786ff8c7fd531a962d896ebd839f 100644 (file)
@@ -5,9 +5,9 @@ use crate::{
 };
 use actix::{Actor, Context, Handler, ResponseFuture};
 use actix_web::web;
-use lemmy_structs::websocket::*;
 use lemmy_db::naive_now;
 use lemmy_rate_limit::RateLimit;
+use lemmy_structs::websocket::*;
 use lemmy_utils::{ConnectionId, IPAddr, LemmyError};
 use log::{error, info};
 use rand::Rng;