dkforest

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

commit 652836bf0995604ec6e17a0f7f222e5ff0669baa
parent a4a7fcffac7d4e776d67c0c8cfcf2ef9f6708260
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 24 May 2023 21:28:48 -0700

improve code

Diffstat:
Mpkg/web/handlers/handlers.go | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -5073,8 +5073,10 @@ Loop: msg.User, _ = db.GetUserByID(msg.UserID) } if msg.GroupID != nil { - group, _ := db.GetRoomGroupByID(msg.RoomID, *msg.GroupID) - msg.Group = &group + if msg.Group == nil { + group, _ := db.GetRoomGroupByID(msg.RoomID, *msg.GroupID) + msg.Group = &group + } } if msg.ToUserID != nil { if msg.ToUser == nil {