Changeset 0.32.0 (#206)

This commit is contained in:
2026-03-19 18:50:27 +00:00
parent 6668e546fe
commit b1266b0d7c
283 changed files with 2187 additions and 1055 deletions

View File

@@ -10,11 +10,11 @@ import (
"github.com/gin-gonic/gin"
"git.gobha.me/xcaliber/chat-switchboard/events"
"git.gobha.me/xcaliber/chat-switchboard/models"
"git.gobha.me/xcaliber/chat-switchboard/notifications"
"git.gobha.me/xcaliber/chat-switchboard/store"
"git.gobha.me/xcaliber/chat-switchboard/tools"
"chat-switchboard/events"
"chat-switchboard/models"
"chat-switchboard/notifications"
"chat-switchboard/store"
"chat-switchboard/tools"
)
// ── Workflow Instance Handler ───────────────
@@ -298,7 +298,7 @@ func (h *WorkflowInstanceHandler) readWorkflowState(ctx context.Context, channel
}
// emitWorkflowEvent pushes a workflow event to all user participants in the channel.
// Uses SendToUser (not room-scoped Bus.Publish) because room subscriptions are
// Uses PublishToUser (not room-scoped Bus.Publish) because room subscriptions are
// not yet wired on the client side. See websocket.md § Room Model.
func (h *WorkflowInstanceHandler) emitWorkflowEvent(label, channelID string, data map[string]any) {
if h.hub == nil {
@@ -318,7 +318,7 @@ func (h *WorkflowInstanceHandler) emitWorkflowEvent(label, channelID string, dat
return
}
for _, uid := range pids {
h.hub.SendToUser(uid, evt)
h.hub.PublishToUser(uid, evt)
}
}
@@ -398,7 +398,7 @@ func (h *WorkflowInstanceHandler) notifyAssignment(ctx context.Context, teamID,
"stage_name": stageName, "assigned_to": assignedTo,
})
for _, m := range members {
h.hub.SendToUser(m.UserID, events.Event{
h.hub.PublishToUser(m.UserID, events.Event{
Label: "workflow.assigned",
Payload: payload,
Ts: time.Now().UnixMilli(),