diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb index 4b5ac227f..68b747ab9 100644 --- a/app/models/journals_for_message.rb +++ b/app/models/journals_for_message.rb @@ -260,6 +260,10 @@ class JournalsForMessage < ActiveRecord::Base if self.user_id != self.jour.user_id self.course_messages << CourseMessage.new(:user_id => self.jour.user_id,:course_id => self.jour.course.id, :viewed => false) end + else + if self.user_id != self.parent.user_id + self.course_messages << CourseMessage.new(:user_id => self.parent.user_id,:course_id => self.jour.course.id, :viewed => false) + end end count = ShieldWechatMessage.where("container_type='User' and container_id=#{self.jour.user_id} and shield_type='Course' and shield_id=#{self.jour.course_id}").count if count == 0 diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index a80a08e42..bab7bb5ec 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -389,7 +389,13 @@ <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>