Changeset 0.32.0 (#206)
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user