diff --git a/app/models/news.rb b/app/models/news.rb index 7131969a4..877d799bf 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -169,7 +169,7 @@ class News < ActiveRecord::Base if self.course self.course.members.each do |m| if m.user_id != self.author_id - self.delay.send_message(m.user_id, self.course_id) + # self.delay.send_message(m.user_id, self.course_id) count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count if count == 0 ws = WechatService.new @@ -189,9 +189,9 @@ class News < ActiveRecord::Base end end - def send_message user_id, course_id - self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => course_id, :viewed => false) - end + # def send_message user_id, course_id + # self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => course_id, :viewed => false) + # end # Time 2015-03-31 13:50:54 # Author lizanle