fix: preserve messages dispatch config in repository hydration

This commit is contained in:
IanShaw027
2026-04-10 18:13:18 +08:00
parent 67a05dfccd
commit 7dc7ff22d2
4 changed files with 142 additions and 0 deletions

View File

@@ -167,6 +167,7 @@ func (r *apiKeyRepository) GetByKeyForAuth(ctx context.Context, key string) (*se
group.FieldSupportedModelScopes,
group.FieldAllowMessagesDispatch,
group.FieldDefaultMappedModel,
group.FieldMessagesDispatchModelConfig,
)
}).
Only(ctx)
@@ -689,6 +690,7 @@ func groupEntityToService(g *dbent.Group) *service.Group {
RequireOAuthOnly: g.RequireOauthOnly,
RequirePrivacySet: g.RequirePrivacySet,
DefaultMappedModel: g.DefaultMappedModel,
MessagesDispatchModelConfig: g.MessagesDispatchModelConfig,
CreatedAt: g.CreatedAt,
UpdatedAt: g.UpdatedAt,
}