mirror of
https://github.com/ergochat/ergo.git
synced 2025-02-09 11:04:10 +01:00
fix spurious "corrupt account creds" logline
Reported by @tacerus. This was most likely introduced by 8b2f6de3e
.
This commit is contained in:
parent
84a5b83eb1
commit
61bce74018
@ -177,13 +177,13 @@ func (am *AccountManager) buildNickToAccountIndex(config *Config) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if rawPrefs, err := tx.Get(fmt.Sprintf(keyAccountSettings, account)); err == nil {
|
if rawPrefs, err := tx.Get(fmt.Sprintf(keyAccountSettings, account)); err == nil && rawPrefs != "" {
|
||||||
var prefs AccountSettings
|
var prefs AccountSettings
|
||||||
err := json.Unmarshal([]byte(rawPrefs), &prefs)
|
err := json.Unmarshal([]byte(rawPrefs), &prefs)
|
||||||
if err == nil && prefs.NickEnforcement != NickEnforcementOptional {
|
if err == nil && prefs.NickEnforcement != NickEnforcementOptional {
|
||||||
accountToMethod[account] = prefs.NickEnforcement
|
accountToMethod[account] = prefs.NickEnforcement
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
am.server.logger.Error("internal", "corrupt account creds", account)
|
am.server.logger.Error("internal", "corrupt account settings", account, err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user