Merge pull request #2216 from slingamn/redact
Some checks failed
build / build (push) Has been cancelled
ghcr / Build (push) Has been cancelled

fix #2215
This commit is contained in:
Shivaram Lingamneni 2025-02-06 01:39:32 -05:00 committed by GitHub
commit eb84ede5f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1530,6 +1530,7 @@ func LoadConfig(filename string) (config *Config, err error) {
config.Server.supportedCaps.Disable(caps.Chathistory)
config.Server.supportedCaps.Disable(caps.EventPlayback)
config.Server.supportedCaps.Disable(caps.ZNCPlayback)
config.Server.supportedCaps.Disable(caps.MessageRedaction)
}
if !config.History.Enabled || !config.History.Persistent.Enabled {
@ -1560,6 +1561,10 @@ func LoadConfig(filename string) (config *Config, err error) {
}
}
if !config.History.Retention.AllowIndividualDelete {
config.Server.supportedCaps.Disable(caps.MessageRedaction) // #2215
}
config.Roleplay.addSuffix = utils.BoolDefaultTrue(config.Roleplay.AddSuffix)
config.Datastore.MySQL.ExpireTime = time.Duration(config.History.Restrictions.ExpireTime)