dkforest

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

commit 135e76e063a7e4b1443bea39d4b131864b47d59f
parent 63d7e9a37dfd70b39195398f6b10f19aafb5b451
Author: Fox <LightFox@home.com>
Date:   Wed, 19 Feb 2025 10:58:11 -0800

added the slash invite feature for cmd

Diffstat:
Mpkg/web/handlers/interceptors/command/command.go | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/pkg/web/handlers/interceptors/command/command.go b/pkg/web/handlers/interceptors/command/command.go @@ -125,12 +125,15 @@ func (c *Command) zeroProcMsgRoom(rawMsg, roomKey string, roomID database.RoomID // 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, _, _ := dutils.ProcessRawMessage(c.DB, rawMsg, roomKey, c.AuthUser.ID, roomID, nil, c.AuthUser.IsModerator(), true, false) - c.zeroRawMsg(toUser, rawMsg, procMsg) + c.ZeroRawMsg(toUser, rawMsg, procMsg) } // ZeroMsg have the "zero usser" send an unprocessed private message to the authUser func (c *Command) ZeroMsg(msg string) { - c.zeroRawMsg(c.AuthUser, msg, msg) + c.ZeroRawMsg(c.AuthUser, msg, msg) +} +func (c *Command) ZeroMsgToUser(AuthUser *database.User, msg string) { + c.ZeroRawMsg(AuthUser, msg, msg) } func (c *Command) ZeroSysMsgTo(user2 *database.User, msg string) { @@ -143,10 +146,10 @@ func (c *Command) ZeroSysMsgToSkipNotify(user2 *database.User, msg string) { // ZeroPublicMsg have the "zero usser" send an unprocessed message in the current room func (c *Command) ZeroPublicMsg(raw, msg string) { - c.zeroRawMsg(nil, raw, msg) + c.ZeroRawMsg(nil, raw, msg) } -func (c *Command) zeroRawMsg(user2 *database.User, raw, msg string) { +func (c *Command) ZeroRawMsg(user2 *database.User, raw, msg string) { zeroUser := c.GetZeroUser() c.rawMsg(zeroUser, user2, raw, msg) }