From: Dessalines Date: Tue, 26 Jan 2021 16:45:36 +0000 (-0500) Subject: Fixing modlog not showing bans and adds. Fixes #1376 X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/%7B?a=commitdiff_plain;h=91d210ce798a8b5872124759fb88b9756c3fd90b;p=lemmy.git Fixing modlog not showing bans and adds. Fixes #1376 --- diff --git a/crates/db_views_moderator/src/mod_add_community_view.rs b/crates/db_views_moderator/src/mod_add_community_view.rs index 1b31e02d..dfb7de7e 100644 --- a/crates/db_views_moderator/src/mod_add_community_view.rs +++ b/crates/db_views_moderator/src/mod_add_community_view.rs @@ -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(), diff --git a/crates/db_views_moderator/src/mod_add_view.rs b/crates/db_views_moderator/src/mod_add_view.rs index bc858728..06c7091c 100644 --- a/crates/db_views_moderator/src/mod_add_view.rs +++ b/crates/db_views_moderator/src/mod_add_view.rs @@ -27,7 +27,7 @@ impl ModAddView { ) -> Result, 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(), diff --git a/crates/db_views_moderator/src/mod_ban_from_community_view.rs b/crates/db_views_moderator/src/mod_ban_from_community_view.rs index 00ac452e..1d9b1faf 100644 --- a/crates/db_views_moderator/src/mod_ban_from_community_view.rs +++ b/crates/db_views_moderator/src/mod_ban_from_community_view.rs @@ -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(), diff --git a/crates/db_views_moderator/src/mod_ban_view.rs b/crates/db_views_moderator/src/mod_ban_view.rs index 1a774319..ff599e18 100644 --- a/crates/db_views_moderator/src/mod_ban_view.rs +++ b/crates/db_views_moderator/src/mod_ban_view.rs @@ -27,7 +27,7 @@ impl ModBanView { ) -> Result, 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(),