mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-10-31 16:07:44 +03:00 
			
		
		
		
	Fix Conversation.get_response
This commit is contained in:
		
							parent
							
								
									cc067b2569
								
							
						
					
					
						commit
						26bcc78d14
					
				|  | @ -164,12 +164,12 @@ class Conversation(ChatGetter): | ||||||
|         # If there is no last-chosen ID, make sure to pick one *after* |         # If there is no last-chosen ID, make sure to pick one *after* | ||||||
|         # the input message, since we don't want responses back in time |         # the input message, since we don't want responses back in time | ||||||
|         if target_id not in indices: |         if target_id not in indices: | ||||||
|             for i, incoming in self._incoming: |             for i, incoming in enumerate(self._incoming): | ||||||
|                 if incoming.id > target_id: |                 if incoming.id > target_id: | ||||||
|                     indices[target_id] = i |                     indices[target_id] = i | ||||||
|                     break |                     break | ||||||
|             else: |             else: | ||||||
|                 indices[target_id] = 0 |                 indices[target_id] = len(self._incoming) | ||||||
| 
 | 
 | ||||||
|         # If there are enough responses saved return the next one |         # If there are enough responses saved return the next one | ||||||
|         last_idx = indices[target_id] |         last_idx = indices[target_id] | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user