added ability to disable third-party verification

This commit is contained in:
onysd 2026-08-06 05:27:48 +03:00
parent 4f0fa895c1
commit 36350f83dc
17 changed files with 211 additions and 69 deletions

View file

@ -119,6 +119,11 @@ type Service struct {
now func() time.Time
chatBotStreamThrottle time.Duration
publicBaseURL string
// hideThirdPartyVerification mirrors config.HideThirdPartyVerification: while
// true, HandlesBot refuses VerifierBotUserID so @marksbot never answers a
// message. The feature is not fully finished and defaults to hidden; see the
// config field's doc comment.
hideThirdPartyVerification bool
// dialogLimiter bounds how often one applicant can drive a service-bot dialog.
// The verification service already rate-limits application creation; this is the
// separate bound on dialog traffic itself, so a script cannot spin the state
@ -234,6 +239,15 @@ func WithCustomVerification(v customVerifications) Option {
}
}
// WithHideThirdPartyVerification mirrors config.HideThirdPartyVerification:
// while true, HandlesBot refuses VerifierBotUserID, so @marksbot never
// receives or answers a message.
func WithHideThirdPartyVerification(hidden bool) Option {
return func(s *Service) {
s.hideThirdPartyVerification = hidden
}
}
// WithVerifierTargets injects the directory of an applicant's own peers used by
// @verifierbot's subject picker. It is optional: with nothing injected the bot
// falls back to the official verification service's EligibleTargets, which