dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 12201581d23b99f695bd38fe5d5d3f0bf4c44883
parent 638397a51d25781f9d1596170cfa7e92a4a078dd
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 24 May 2023 17:45:09 -0700

simplify code

Diffstat:
Mpkg/web/handlers/handlers.go | 12+++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -5064,15 +5064,9 @@ Loop: } if (pmOnlyQuery == database.PmOnly && msg.ToUser == nil) || - (pmOnlyQuery == database.PmNone && msg.ToUser != nil) { - continue - } - - if !authUser.DisplayModerators && msg.Moderators { - continue - } - - if !displayHellbanned && msg.IsHellbanned { + (pmOnlyQuery == database.PmNone && msg.ToUser != nil) || + !authUser.DisplayModerators && msg.Moderators || + !displayHellbanned && msg.IsHellbanned { continue }