Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
6af9e849d9
|
@ -169,7 +169,7 @@ class News < ActiveRecord::Base
|
||||||
if self.course
|
if self.course
|
||||||
self.course.members.each do |m|
|
self.course.members.each do |m|
|
||||||
if m.user_id != self.author_id
|
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
|
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
|
if count == 0
|
||||||
ws = WechatService.new
|
ws = WechatService.new
|
||||||
|
@ -189,9 +189,9 @@ class News < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_message user_id, course_id
|
# def send_message user_id, course_id
|
||||||
self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => course_id, :viewed => false)
|
# self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => course_id, :viewed => false)
|
||||||
end
|
# end
|
||||||
|
|
||||||
# Time 2015-03-31 13:50:54
|
# Time 2015-03-31 13:50:54
|
||||||
# Author lizanle
|
# Author lizanle
|
||||||
|
|
Loading…
Reference in New Issue