mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-24 05:23:04 +00:00
New signups now are subbed to main by default.
This commit is contained in:
parent
ca26756d0a
commit
b776912697
1 changed files with 13 additions and 11 deletions
|
@ -816,6 +816,19 @@ impl Perform for Register {
|
|||
}
|
||||
};
|
||||
|
||||
// Sign them up for main community no matter what
|
||||
let community_follower_form = CommunityFollowerForm {
|
||||
community_id: 1,
|
||||
user_id: inserted_user.id,
|
||||
};
|
||||
|
||||
let _inserted_community_follower = match CommunityFollower::follow(&conn, &community_follower_form) {
|
||||
Ok(user) => user,
|
||||
Err(_e) => {
|
||||
return Err(self.error("Community follower already exists."))?
|
||||
}
|
||||
};
|
||||
|
||||
// If its an admin, add them as a mod and follower to main
|
||||
if self.admin {
|
||||
let community_moderator_form = CommunityModeratorForm {
|
||||
|
@ -830,17 +843,6 @@ impl Perform for Register {
|
|||
}
|
||||
};
|
||||
|
||||
let community_follower_form = CommunityFollowerForm {
|
||||
community_id: 1,
|
||||
user_id: inserted_user.id,
|
||||
};
|
||||
|
||||
let _inserted_community_follower = match CommunityFollower::follow(&conn, &community_follower_form) {
|
||||
Ok(user) => user,
|
||||
Err(_e) => {
|
||||
return Err(self.error("Community follower already exists."))?
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue