]> Untitled Git - lemmy.git/commitdiff
Fixing modlog not showing bans and adds. Fixes #1376
authorDessalines <tyhou13@gmx.com>
Tue, 26 Jan 2021 16:45:36 +0000 (11:45 -0500)
committerDessalines <tyhou13@gmx.com>
Tue, 26 Jan 2021 16:45:36 +0000 (11:45 -0500)
crates/db_views_moderator/src/mod_add_community_view.rs
crates/db_views_moderator/src/mod_add_view.rs
crates/db_views_moderator/src/mod_ban_from_community_view.rs
crates/db_views_moderator/src/mod_ban_view.rs

index 1b31e02d4bb3f7c7e5b261292d15de623ac38b0f..dfb7de7e61adbf2c28fe607696541145415f4d83 100644 (file)
@@ -31,7 +31,7 @@ impl ModAddCommunityView {
     let mut query = mod_add_community::table
       .inner_join(user_::table.on(mod_add_community::mod_user_id.eq(user_::id)))
       .inner_join(community::table)
-      .inner_join(user_alias_1::table.on(mod_add_community::other_user_id.eq(user_::id)))
+      .inner_join(user_alias_1::table.on(mod_add_community::other_user_id.eq(user_alias_1::id)))
       .select((
         mod_add_community::all_columns,
         User_::safe_columns_tuple(),
index bc858728f0194b9a5737fe55cfa5b9d52b36b6e2..06c7091cc0e48ddc388a3df71d1d3c77f07adf58 100644 (file)
@@ -27,7 +27,7 @@ impl ModAddView {
   ) -> Result<Vec<Self>, Error> {
     let mut query = mod_add::table
       .inner_join(user_::table.on(mod_add::mod_user_id.eq(user_::id)))
-      .inner_join(user_alias_1::table.on(mod_add::other_user_id.eq(user_::id)))
+      .inner_join(user_alias_1::table.on(mod_add::other_user_id.eq(user_alias_1::id)))
       .select((
         mod_add::all_columns,
         User_::safe_columns_tuple(),
index 00ac452e700df72a82ef3f844ccc8c675b4107c3..1d9b1fafdd88f906acc483ac07ac769a178cf9b9 100644 (file)
@@ -31,7 +31,9 @@ impl ModBanFromCommunityView {
     let mut query = mod_ban_from_community::table
       .inner_join(user_::table.on(mod_ban_from_community::mod_user_id.eq(user_::id)))
       .inner_join(community::table)
-      .inner_join(user_alias_1::table.on(mod_ban_from_community::other_user_id.eq(user_::id)))
+      .inner_join(
+        user_alias_1::table.on(mod_ban_from_community::other_user_id.eq(user_alias_1::id)),
+      )
       .select((
         mod_ban_from_community::all_columns,
         User_::safe_columns_tuple(),
index 1a7743194881ef83b69034f56d5394d23d7d2122..ff599e18771108db3da312704823aad0729e61ef 100644 (file)
@@ -27,7 +27,7 @@ impl ModBanView {
   ) -> Result<Vec<Self>, Error> {
     let mut query = mod_ban::table
       .inner_join(user_::table.on(mod_ban::mod_user_id.eq(user_::id)))
-      .inner_join(user_alias_1::table.on(mod_ban::other_user_id.eq(user_::id)))
+      .inner_join(user_alias_1::table.on(mod_ban::other_user_id.eq(user_alias_1::id)))
       .select((
         mod_ban::all_columns,
         User_::safe_columns_tuple(),