Use can_pester? logic for timeline tweets
This commit is contained in:
		
							parent
							
								
									9d8e30d7f6
								
							
						
					
					
						commit
						8135aaaabb
					
				
					 2 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -258,6 +258,11 @@ module Ebooks
 | 
			
		|||
          return
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        if !meta[:mentions_bot] && !userinfo(ev.user.screen_name).can_pester?
 | 
			
		||||
          log "Already pestered @#{ev.user.screen_name} enough for now"
 | 
			
		||||
          return
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        log "Replying to @#{ev.user.screen_name} with: #{meta[:reply_prefix] + text}"
 | 
			
		||||
        @twitter.update(meta[:reply_prefix] + text, in_reply_to_status_id: ev.id)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue