-
-
Notifications
You must be signed in to change notification settings - Fork 948
Expand file tree
/
Copy pathlib.rs
More file actions
25 lines (23 loc) · 733 Bytes
/
lib.rs
File metadata and controls
25 lines (23 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use lemmy_api_utils::context::LemmyContext;
use lemmy_db_schema::source::community::{Community, CommunityActions};
pub mod comment;
pub mod community;
pub mod custom_emoji;
pub mod invite;
pub mod multi_community;
pub mod oauth_provider;
pub mod post;
pub mod private_message;
pub mod site;
pub mod tagline;
pub mod user;
/// Only mark new posts/comments to remote community as pending if it has any local followers.
/// Otherwise it could never get updated to be marked as published.
async fn community_use_pending(community: &Community, context: &LemmyContext) -> bool {
if community.local {
return false;
}
CommunityActions::check_accept_activity_in_community(&mut context.pool(), community)
.await
.is_ok()
}