mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 10:10:08 -08:00
fix #2215
Hide the message-redaction capability if allow-individual-delete is disabled. (Technically REDACT can still be used, but only by ircops, so advertising it is misleading in the most common case).
This commit is contained in:
parent
d9f663c400
commit
d50f1471eb
1 changed files with 5 additions and 0 deletions
|
|
@ -1530,6 +1530,7 @@ func LoadConfig(filename string) (config *Config, err error) {
|
||||||
config.Server.supportedCaps.Disable(caps.Chathistory)
|
config.Server.supportedCaps.Disable(caps.Chathistory)
|
||||||
config.Server.supportedCaps.Disable(caps.EventPlayback)
|
config.Server.supportedCaps.Disable(caps.EventPlayback)
|
||||||
config.Server.supportedCaps.Disable(caps.ZNCPlayback)
|
config.Server.supportedCaps.Disable(caps.ZNCPlayback)
|
||||||
|
config.Server.supportedCaps.Disable(caps.MessageRedaction)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !config.History.Enabled || !config.History.Persistent.Enabled {
|
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.Roleplay.addSuffix = utils.BoolDefaultTrue(config.Roleplay.AddSuffix)
|
||||||
|
|
||||||
config.Datastore.MySQL.ExpireTime = time.Duration(config.History.Restrictions.ExpireTime)
|
config.Datastore.MySQL.ExpireTime = time.Duration(config.History.Restrictions.ExpireTime)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue