let community_follower_form = CommunityFollowerForm {
community_id: data.community_id,
person_id: banned_person_id,
- pending: Some(false),
+ pending: false,
};
blocking(context.pool(), move |conn: &'_ _| {
CommunityFollower::unfollow(conn, &community_follower_form)
let community_follower_form = CommunityFollowerForm {
community_id: data.community_id,
person_id,
- pending: Some(false),
+ pending: false,
};
blocking(context.pool(), move |conn: &'_ _| {
CommunityFollower::unfollow(conn, &community_follower_form)
let community_follower_form = CommunityFollowerForm {
community_id: data.community_id,
person_id: local_user_view.person.id,
- pending: Some(false), // Don't worry, this form isn't used for remote follows
+ pending: false, // Don't worry, this form isn't used for remote follows
};
if community.local {
let community_follower_form = CommunityFollowerForm {
community_id: inserted_community.id,
person_id: local_user_view.person.id,
- pending: Some(false),
+ pending: false,
};
let follow = move |conn: &'_ _| CommunityFollower::follow(conn, &community_follower_form);
let community_follower_form = CommunityFollowerForm {
community_id: main_community.id,
person_id: inserted_person.id,
- pending: Some(false),
+ pending: false,
};
let follow = move |conn: &'_ _| CommunityFollower::follow(conn, &community_follower_form);
let community_follower_form = CommunityFollowerForm {
community_id: community.id,
person_id: blocked_person.id,
- pending: Some(false),
+ pending: false,
};
blocking(context.pool(), move |conn: &'_ _| {
CommunityFollower::unfollow(conn, &community_follower_form)
let community_follower_form = CommunityFollowerForm {
community_id: community.id,
person_id: actor.id,
- pending: Some(true),
+ pending: true,
};
blocking(context.pool(), move |conn| {
CommunityFollower::follow(conn, &community_follower_form).ok()
let community_follower_form = CommunityFollowerForm {
community_id: community.id,
person_id: person.id,
- pending: Some(false),
+ pending: false,
};
// This will fail if they're already a follower, but ignore the error.
let community_follower_form = CommunityFollowerForm {
community_id: community.id,
person_id: person.id,
- pending: Some(false),
+ pending: false,
};
// This will fail if they aren't a follower, but ignore the error.
let first_person_follow = CommunityFollowerForm {
community_id: inserted_community.id,
person_id: inserted_person.id,
- pending: Some(false),
+ pending: false,
};
CommunityFollower::follow(&conn, &first_person_follow).unwrap();
let second_person_follow = CommunityFollowerForm {
community_id: inserted_community.id,
person_id: another_inserted_person.id,
- pending: Some(false),
+ pending: false,
};
CommunityFollower::follow(&conn, &second_person_follow).unwrap();
let another_community_follow = CommunityFollowerForm {
community_id: another_inserted_community.id,
person_id: inserted_person.id,
- pending: Some(false),
+ pending: false,
};
CommunityFollower::follow(&conn, &another_community_follow).unwrap();
let community_follower_form = CommunityFollowerForm {
community_id: inserted_community.id,
person_id: inserted_person.id,
- pending: Some(false),
+ pending: false,
};
let inserted_community_follower =
pub struct CommunityFollowerForm {
pub community_id: CommunityId,
pub person_id: PersonId,
- pub pending: Option<bool>,
+ pub pending: bool,
}
alter table community_follower
alter column pending set not null,
- alter column pending set default true;
+ alter column pending drop default;