};
use actix_web::HttpRequest;
use anyhow::{anyhow, Context};
-use lemmy_db::{activity::Activity, community::Community, user::User_, DbPool};
+use lemmy_db::{activity::Activity, community::Community, user::User_, ApubObject, DbPool};
use lemmy_structs::blocking;
use lemmy_utils::{location_info, settings::Settings, LemmyError};
use lemmy_websocket::LemmyContext;
) -> Result<bool, LemmyError> {
for url in to_and_cc {
let url = url.to_string();
- let user = blocking(&pool, move |conn| User_::read_from_actor_id(&conn, &url)).await?;
+ let user = blocking(&pool, move |conn| User_::read_from_apub_id(&conn, &url)).await?;
if let Ok(u) = user {
if u.local {
return Ok(true);
if url.ends_with("/followers") {
let community_url = url.replace("/followers", "");
let community = blocking(&pool, move |conn| {
- Community::read_from_actor_id(&conn, &community_url)
+ Community::read_from_apub_id(&conn, &community_url)
})
.await??;
if !community.local {