mirror of
				https://github.com/ergochat/ergo.git
				synced 2025-10-30 21:37:23 +01:00 
			
		
		
		
	fix #1216
This commit is contained in:
		
							parent
							
								
									bcf581f63d
								
							
						
					
					
						commit
						d679d21ac0
					
				| @ -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 | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Shivaram Lingamneni
						Shivaram Lingamneni