mirror of
				https://github.com/osmarks/mycorrhiza.git
				synced 2025-10-30 23:23:04 +00:00 
			
		
		
		
	Fix a Telegram-related bug
I removed my favorite comment: // Problems is something we put blankets on.
This commit is contained in:
		| @@ -170,8 +170,9 @@ func handlerTelegramLogin(w http.ResponseWriter, rq *http.Request) { | ||||
| 			false, | ||||
| 		) | ||||
| 	) | ||||
| 	// If registering a user via Telegram failed, because a Telegram user with this name | ||||
| 	// has already registered, then everything is actually ok! | ||||
| 	if user.HasUsername(username) && user.ByName(username).Source == "telegram" { | ||||
| 		// Problems is something we put blankets on. | ||||
| 		err = nil | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -59,7 +59,7 @@ func Register(username, password, group, source string, force bool) error { | ||||
| 		return fmt.Errorf("username ‘%s’ is already taken", username) | ||||
| 	case !force && cfg.RegistrationLimit > 0 && Count() >= cfg.RegistrationLimit: | ||||
| 		return fmt.Errorf("reached the limit of registered users (%d)", cfg.RegistrationLimit) | ||||
| 	case password == "": | ||||
| 	case password == "" && source != "telegram": | ||||
| 		return fmt.Errorf("password must not be empty") | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Timur Ismagilov
					Timur Ismagilov