use crate::{
- functions::lower,
- naive_now,
newtypes::{CommunityId, DbUrl, PersonId},
source::community::{
Community,
CommunitySafe,
},
traits::{ApubActor, Bannable, Crud, DeleteableOrRemoveable, Followable, Joinable},
+ utils::{functions::lower, naive_now},
};
use diesel::{
dsl::*,
icon,
banner,
hidden,
+ posting_restricted_to_mods,
);
impl ToSafe for Community {
icon,
banner,
hidden,
+ posting_restricted_to_mods,
)
}
}
#[cfg(test)]
mod tests {
use crate::{
- establish_unpooled_connection,
source::{community::*, person::*},
traits::{Bannable, Crud, Followable, Joinable},
+ utils::establish_unpooled_connection,
};
use serial_test::serial;
inbox_url: inserted_community.inbox_url.to_owned(),
shared_inbox_url: None,
hidden: false,
+ posting_restricted_to_mods: false,
};
let community_follower_form = CommunityFollowerForm {