feat(integrations): polish embed/IM channel editors and agent rebind
Align embed channel setup with a step wizard, simplify deploy layout, and allow changing bound agents on update for embed and IM channels.
This commit is contained in:
@@ -177,6 +177,12 @@ func (s *embedChannelService) Update(
|
||||
ch.AllowedOrigins = req.AllowedOrigins
|
||||
}
|
||||
}
|
||||
if trimmed := strings.TrimSpace(req.AgentID); trimmed != "" && trimmed != ch.AgentID {
|
||||
if _, err := s.ensureAgentOwned(ctx, tenantID, trimmed); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ch.AgentID = trimmed
|
||||
}
|
||||
if err := s.repo.Update(ctx, ch); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user