|  |  |  | @ -53,11 +53,11 @@ class Discuss < ApplicationRecord | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |   def send_tiding | 
			
		
	
		
			
				
					|  |  |  |  |     if dis_type == 'Shixun' | 
			
		
	
		
			
				
					|  |  |  |  |       user_id = has_parent? ? parent.user_id : Challenge.find(challenge_id).user_id | 
			
		
	
		
			
				
					|  |  |  |  |       send_user_id = has_parent? ? parent.user_id : Challenge.find(challenge_id).user_id | 
			
		
	
		
			
				
					|  |  |  |  |       parent_container_type = 'Challenge' | 
			
		
	
		
			
				
					|  |  |  |  |       challenge_id = challenge_id | 
			
		
	
		
			
				
					|  |  |  |  |     elsif dis_type == 'Hack' | 
			
		
	
		
			
				
					|  |  |  |  |       user_id = has_parent? ? parent.user_id : Hack.find(dis_id).user_id | 
			
		
	
		
			
				
					|  |  |  |  |       send_user_id = has_parent? ? parent.user_id : Hack.find(dis_id).user_id | 
			
		
	
		
			
				
					|  |  |  |  |       parent_container_type = 'Hack' | 
			
		
	
		
			
				
					|  |  |  |  |       challenge_id = dis_id | 
			
		
	
		
			
				
					|  |  |  |  |     end | 
			
		
	
	
		
			
				
					|  |  |  | @ -65,6 +65,6 @@ class Discuss < ApplicationRecord | 
			
		
	
		
			
				
					|  |  |  |  |         trigger_user_id: user_id, parent_container_id: challenge_id, parent_container_type: parent_container_type, | 
			
		
	
		
			
				
					|  |  |  |  |         belong_container_id: dis_id, belong_container_type: dis_type, viewed: 0, tiding_type: 'Comment' | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  |     tidings.create!(base_attrs.merge(user_id: user_id)) | 
			
		
	
		
			
				
					|  |  |  |  |     tidings.create!(base_attrs.merge(user_id: send_user_id)) | 
			
		
	
		
			
				
					|  |  |  |  |   end | 
			
		
	
		
			
				
					|  |  |  |  | end | 
			
		
	
	
		
			
				
					|  |  |  | 
 |