bots: Correct weird behavior of followup bot for empty messages.
Before it sends an empty message to followup stream, now it sends a help message back to the user/stream where it was mentioned.
This commit is contained in:
		
							parent
							
								
									854416b725
								
							
						
					
					
						commit
						b540c09768
					
				
					 1 changed files with 12 additions and 8 deletions
				
			
		|  | @ -23,6 +23,10 @@ class FollowupHandler(object): | |||
|             ''' | ||||
| 
 | ||||
|     def handle_message(self, message, client, state_handler): | ||||
|         if message['content'] == '': | ||||
|             bot_response = "Please specify the message you want to send to followup stream after @mention-bot" | ||||
|             client.send_reply(message, bot_response) | ||||
|         else: | ||||
|             bot_response = self.get_bot_followup_response(message) | ||||
|             client.send_message(dict( | ||||
|                 type='stream', | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Krzysztof Krzysztof
						Krzysztof Krzysztof