]> Untitled Git - lemmy.git/commitdiff
New signups now are subbed to main by default.
authorDessalines <tyhou13@gmx.com>
Thu, 25 Apr 2019 18:34:58 +0000 (11:34 -0700)
committerDessalines <tyhou13@gmx.com>
Thu, 25 Apr 2019 18:34:58 +0000 (11:34 -0700)
server/src/websocket_server/server.rs

index 914bf9f2b258a39b76c46b8f2afd778d3c52d71e..dee42726242d7adbf9421bd89a711139afd50367 100644 (file)
@@ -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."))?
-        }
-      };
     }