refactor: remove bot type

This commit is contained in:
Acbox
2026-03-15 00:42:09 +08:00
parent 6741f3f3f1
commit ac8a935545
45 changed files with 163 additions and 453 deletions
+1 -4
View File
@@ -96,9 +96,6 @@ func (h *SettingsHandler) Upsert(c echo.Context) error {
}
resp, err := h.service.UpsertBot(c.Request().Context(), botID, req)
if err != nil {
if errors.Is(err, settings.ErrPersonalBotGuestAccessUnsupported) {
return echo.NewHTTPError(http.StatusBadRequest, "personal bot does not support guest access")
}
if errors.Is(err, settings.ErrInvalidModelRef) {
return echo.NewHTTPError(http.StatusBadRequest, err.Error())
}
@@ -148,5 +145,5 @@ func (*SettingsHandler) requireChannelIdentityID(c echo.Context) (string, error)
}
func (h *SettingsHandler) authorizeBotAccess(ctx context.Context, channelIdentityID, botID string) (bots.Bot, error) {
return AuthorizeBotAccess(ctx, h.botService, h.accountService, channelIdentityID, botID, bots.AccessPolicy{})
return AuthorizeBotAccess(ctx, h.botService, h.accountService, channelIdentityID, botID)
}