Fix inconsistent behavior when history.enabled is set but
history.chathistory-maxmessages is not
This commit is contained in:
Shivaram Lingamneni 2025-12-14 02:13:15 -05:00 committed by GitHub
parent aef5d77b3b
commit fdd261a1e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 4 deletions

View file

@ -908,6 +908,9 @@ func (server *Server) applyConfig(config *Config) (err error) {
if config.Accounts.RequireSasl.Enabled && config.Accounts.Registration.Enabled {
server.logger.Warning("server", "Warning: although require-sasl is enabled, users can still register accounts. If your server is not intended to be public, you must set accounts.registration.enabled to false.")
}
if config.History.Enabled && config.History.ChathistoryMax == 0 {
server.logger.Warning("server", "Warning: for history to work correctly, you must set history.chathistory-maxmessages (see default.yaml for a recommendation).")
}
return err
}