fix: propagate TenantID in team task dispatch InboundMessage

dispatchTaskToAgent() constructed InboundMessage without TenantID,
causing DB-level MCP servers to be invisible when dispatching team
tasks from the dashboard. Same root cause as #560.
This commit is contained in:
viettranx committed 2026-03-30 08:13:36 +07:00
1 parent 7b066b7056
commit 7f897fe9f5
1 file changed
+1
@@ -405,6 +405,7 @@ func (m *TeamsMethods) dispatchTaskToAgent(ctx context.Context, task *store.Team
Content: content,
UserID: userID,
AgentID: ag.AgentKey,
TenantID: store.TenantIDFromContext(ctx),
Metadata: meta,
})
slog.Info("teams.tasks.dispatch: sent task to agent",