Merge pull request #1899 from slingamn/saregister_fix

fix #1898
This commit is contained in:
Shivaram Lingamneni
2022-01-10 02:27:15 -05:00
committed by GitHub
+4 -2
View File
@@ -474,8 +474,10 @@ func (am *AccountManager) Register(client *Client, account string, callbackNames
am.Unregister(casefoldedAccount, true)
return &registrationCallbackError{underlying: err}
} else {
am.server.logger.Info("accounts",
fmt.Sprintf("nickname %s registered account %s, pending verification", client.Nick(), account))
if client != nil && code != "" {
am.server.logger.Info("accounts",
fmt.Sprintf("nickname %s registered account %s, pending verification", client.Nick(), account))
}
return am.server.store.Update(func(tx *buntdb.Tx) error {
_, _, err = tx.Set(verificationCodeKey, code, setOptions)
return err