mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
Fix inconsistent behavior when history.enabled is set but history.chathistory-maxmessages is not
This commit is contained in:
parent
aef5d77b3b
commit
fdd261a1e6
3 changed files with 10 additions and 4 deletions
|
|
@ -1611,7 +1611,7 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||
// in the current implementation, we disable history by creating a history buffer
|
||||
// with zero capacity. but the `enabled` config option MUST be respected regardless
|
||||
// of this detail
|
||||
if !config.History.Enabled {
|
||||
if !config.History.Enabled || config.History.ChathistoryMax == 0 {
|
||||
config.History.ChannelLength = 0
|
||||
config.History.ClientLength = 0
|
||||
config.Server.supportedCaps.Disable(caps.Chathistory)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue