3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-11 06:29:29 +01:00
This commit is contained in:
Shivaram Lingamneni 2020-07-26 04:10:28 -04:00
parent bcf581f63d
commit d679d21ac0

View File

@ -903,6 +903,23 @@ func (am *AccountManager) Verify(client *Client, account string, code string) er
am.server.RandomlyRename(currentClient)
}
}
// #1216: we may have created an always-on client
if client == nil {
config := am.server.Config()
if persistenceEnabled(config.Accounts.Multiclient.AlwaysOn, PersistentUnspecified) {
accountData, err := am.LoadAccount(account)
if err != nil {
return err
}
am.server.AddAlwaysOnClient(
accountData,
nil,
nil,
config.Accounts.defaultUserModes,
"",
)
}
}
return nil
}