]> Untitled Git - lemmy.git/blobdiff - crates/db_views_actor/src/community_view.rs
Adding users active monthly for community sort. Fixes #1527
[lemmy.git] / crates / db_views_actor / src / community_view.rs
index fe3a80bb7189b0572cd02f8765eb3ffbe83eceac..87b9cbcf16748181bd4f4638ba9e95331b1d72fd 100644 (file)
@@ -193,6 +193,7 @@ impl<'a> CommunityQueryBuilder<'a> {
     match self.sort {
       SortType::New => query = query.order_by(community::published.desc()),
       SortType::TopAll => query = query.order_by(community_aggregates::subscribers.desc()),
+      SortType::TopMonth => query = query.order_by(community_aggregates::users_active_month.desc()),
       // Covers all other sorts, including hot
       _ => {
         query = query