dkforest

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

commit 4efc72e85bc085221ee7ec549033b56eb6854c77
parent f46957b63a00d968c01f785a7f29aa69bd5c7b38
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon, 22 May 2023 03:16:55 -0700

publish system msgs

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

diff --git a/pkg/database/tableChatMessages.go b/pkg/database/tableChatMessages.go @@ -470,7 +470,9 @@ func (d *DkfDB) CreateSysMsg(raw, txt, roomKey string, roomID RoomID, userID Use } msg := makeMsg(raw, txt, roomID, userID) msg.System = true - return d.db.Create(&msg).Error + err := d.db.Create(&msg).Error + MsgPubSub.Pub("room_"+utils.FormatInt64(int64(roomID)), &msg) + return err } func (d *DkfDB) CreateKickMsg(kickedUser, kickedByUser User) {