dkforest

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

commit 59e26cc20e6594b0c59f4074fd2f44d6ef4402af
parent 6fdb301c181ad56c98b69e176196c0bb2f39959e
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 25 Jan 2023 13:16:17 -0800

hide private notes when under duress

Diffstat:
Mpkg/web/handlers/handlers.go | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -2605,7 +2605,9 @@ func SettingsPrivateNotesHandler(c echo.Context) error { } var data settingsPrivateNotesData data.ActiveTab = "notes" - data.Notes, _ = database.GetUserPrivateNotes(authUser.ID) + if !authUser.IsUnderDuress { + data.Notes, _ = database.GetUserPrivateNotes(authUser.ID) + } if c.Request().Method == http.MethodPost { notes := c.Request().PostFormValue("private_notes")