Changeset 0.32.0 (#206)
This commit is contained in:
@@ -13,22 +13,22 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/auth"
|
||||
capspkg "git.gobha.me/xcaliber/chat-switchboard/capabilities"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/crypto"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/database"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/events"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/filters"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/health"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/knowledge"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/models"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/notifications"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/providers"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/routing"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/sandbox"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/storage"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/store"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/tools"
|
||||
"chat-switchboard/auth"
|
||||
capspkg "chat-switchboard/capabilities"
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/events"
|
||||
"chat-switchboard/filters"
|
||||
"chat-switchboard/health"
|
||||
"chat-switchboard/knowledge"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/notifications"
|
||||
"chat-switchboard/providers"
|
||||
"chat-switchboard/routing"
|
||||
"chat-switchboard/sandbox"
|
||||
"chat-switchboard/storage"
|
||||
"chat-switchboard/store"
|
||||
"chat-switchboard/tools"
|
||||
)
|
||||
|
||||
// ── Request Types ───────────────────────────
|
||||
@@ -280,7 +280,7 @@ func (h *CompletionHandler) Complete(c *gin.Context) {
|
||||
Ts: time.Now().UnixMilli(),
|
||||
}
|
||||
// Send to sender
|
||||
h.hub.SendToUser(userID, evt)
|
||||
h.hub.PublishToUser(userID, evt)
|
||||
// Send to other user participants in the channel
|
||||
pRows, pErr := database.DB.QueryContext(c.Request.Context(), database.Q(`
|
||||
SELECT participant_id FROM channel_participants
|
||||
@@ -291,7 +291,7 @@ func (h *CompletionHandler) Complete(c *gin.Context) {
|
||||
for pRows.Next() {
|
||||
var pid string
|
||||
if pRows.Scan(&pid) == nil {
|
||||
h.hub.SendToUser(pid, evt)
|
||||
h.hub.PublishToUser(pid, evt)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -598,7 +598,7 @@ func (h *CompletionHandler) Complete(c *gin.Context) {
|
||||
"from_user": userID,
|
||||
"content": truncateContent(req.Content, 120),
|
||||
})
|
||||
h.hub.SendToUser(mentionedUserID, events.Event{
|
||||
h.hub.PublishToUser(mentionedUserID, events.Event{
|
||||
Label: "user.mentioned",
|
||||
Payload: payload,
|
||||
Ts: time.Now().UnixMilli(),
|
||||
|
||||
Reference in New Issue
Block a user