mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Merge pull request #1381 from LemmyNet/fix_mod_bans_and_adds
Fixing modlog not showing bans and adds. Fixes #1376
This commit is contained in:
commit
ea59cf16e8
@ -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(),
|
||||
|
@ -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(),
|
||||
|
@ -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(),
|
||||
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user