mirror of
https://github.com/ergochat/ergo.git
synced 2025-04-13 11:27:52 +02:00
fix #1244
This commit is contained in:
parent
4c0144c708
commit
6628a3d1c6
@ -815,7 +815,9 @@ history:
|
|||||||
# users to do session resumption / query history after disconnections.
|
# users to do session resumption / query history after disconnections.
|
||||||
grace-period: 1h
|
grace-period: 1h
|
||||||
|
|
||||||
# options to store history messages in a persistent database (currently only MySQL):
|
# options to store history messages in a persistent database (currently only MySQL).
|
||||||
|
# in order to enable any of this functionality, you must configure a MySQL server
|
||||||
|
# in the `datastore.mysql` section.
|
||||||
persistent:
|
persistent:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
@ -843,7 +843,9 @@ history:
|
|||||||
# users to do session resumption / query history after disconnections.
|
# users to do session resumption / query history after disconnections.
|
||||||
grace-period: 1h
|
grace-period: 1h
|
||||||
|
|
||||||
# options to store history messages in a persistent database (currently only MySQL):
|
# options to store history messages in a persistent database (currently only MySQL).
|
||||||
|
# in order to enable any of this functionality, you must configure a MySQL server
|
||||||
|
# in the `datastore.mysql` section.
|
||||||
persistent:
|
persistent:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
@ -1152,11 +1152,16 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !config.History.Enabled || !config.History.Persistent.Enabled {
|
if !config.History.Enabled || !config.History.Persistent.Enabled {
|
||||||
|
config.History.Persistent.Enabled = false
|
||||||
config.History.Persistent.UnregisteredChannels = false
|
config.History.Persistent.UnregisteredChannels = false
|
||||||
config.History.Persistent.RegisteredChannels = PersistentDisabled
|
config.History.Persistent.RegisteredChannels = PersistentDisabled
|
||||||
config.History.Persistent.DirectMessages = PersistentDisabled
|
config.History.Persistent.DirectMessages = PersistentDisabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.History.Persistent.Enabled && !config.Datastore.MySQL.Enabled {
|
||||||
|
return nil, fmt.Errorf("You must configure a MySQL server in order to enable persistent history")
|
||||||
|
}
|
||||||
|
|
||||||
if config.History.ZNCMax == 0 {
|
if config.History.ZNCMax == 0 {
|
||||||
config.History.ZNCMax = config.History.ChathistoryMax
|
config.History.ZNCMax = config.History.ChathistoryMax
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user