From: Dessalines Date: Thu, 25 Apr 2019 18:34:58 +0000 (-0700) Subject: New signups now are subbed to main by default. X-Git-Url: http://these/git/readmes/static/%7B%60/css/themes/%7Biframely.url%7D?a=commitdiff_plain;h=fdc5a23f2ac2d166a11fe2eb0670c97a16122835;p=lemmy.git New signups now are subbed to main by default. --- diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs index 914bf9f2..dee42726 100644 --- a/server/src/websocket_server/server.rs +++ b/server/src/websocket_server/server.rs @@ -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."))? - } - }; }