mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-10-31 16:07:44 +03:00 
			
		
		
		
	Allow overriding phone on .sign_in (fix #278)
This commit is contained in:
		
							parent
							
								
									1d159908c7
								
							
						
					
					
						commit
						1d250a5441
					
				|  | @ -148,9 +148,12 @@ class TelegramClient(TelegramBareClient): | |||
|         if phone and not code: | ||||
|             return self.send_code_request(phone) | ||||
|         elif code: | ||||
|             if self._phone is None: | ||||
|             if not self._phone: | ||||
|                 self._phone = phone | ||||
|             if not self._phone: | ||||
|                 raise ValueError( | ||||
|                     'Please make sure to call send_code_request first.') | ||||
|                     'Please make sure to call send_code_request first.' | ||||
|                 ) | ||||
| 
 | ||||
|             try: | ||||
|                 if isinstance(code, int): | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user