dkforest

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

commit 5c1279a9fd7ffe60a2383909dcd851ac24d9daae
parent 4f474f6308fb501de0d984978fe7ffabb14e3600
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue,  6 Jun 2023 00:36:32 -0700

doc

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

diff --git a/pkg/web/handlers/api/v1/topBarHandler.go b/pkg/web/handlers/api/v1/topBarHandler.go @@ -432,29 +432,33 @@ func (c *Command) getZeroUser() database.User { return *c.zeroUser } -// Have the "zero" bot account send a processed message to the user +// Have the "zero user" send a processed message to the authUser func (c *Command) zeroProcMsg(rawMsg string) { c.zeroProcMsgRoom(rawMsg, c.roomKey, c.room.ID) } +// Have the "zero user" send a processed message in the specified room func (c *Command) zeroPublicProcMsgRoom(rawMsg, roomKey string, roomID database.RoomID) { c.zeroProcMsgRoomToUser(rawMsg, roomKey, roomID, nil) } +// Have the "zero user" send a processed message to the authUser in the specified room func (c *Command) zeroProcMsgRoom(rawMsg, roomKey string, roomID database.RoomID) { c.zeroProcMsgRoomToUser(rawMsg, roomKey, roomID, c.authUser) } +// Have the "zero user" send a "processed message" PM to a user in a specific room. func (c *Command) zeroProcMsgRoomToUser(rawMsg, roomKey string, roomID database.RoomID, toUser *database.User) { procMsg, _, _ := ProcessRawMessage(c.db, rawMsg, roomKey, c.authUser.ID, roomID, nil, true) c.zeroRawMsg(toUser, rawMsg, procMsg) } -// Have the "zero" bot account send a message to the authUser +// Have the "zero usser" send an unprocessed private message to the authUser func (c *Command) zeroMsg(msg string) { c.zeroRawMsg(c.authUser, msg, msg) } +// Have the "zero usser" send an unprocessed message in the current room func (c *Command) zeroPublicMsg(raw, msg string) { c.zeroRawMsg(nil, raw, msg) }