diff --git a/app/models/journal_reply.rb b/app/models/journal_reply.rb index 430d506ed..a1ea761af 100644 --- a/app/models/journal_reply.rb +++ b/app/models/journal_reply.rb @@ -16,14 +16,15 @@ class JournalReply < ActiveRecord::Base replier = User.find(self.reply_id) receivers = [] # 被回复的人发送消息 - if journal.user_id != self.reply_id - receivers << self.replier + if journal.user_id != self.reply_id && self.reply_id != journal.issue.author_id + receivers << replier end if journal.user_id != journal.issue.author_id && self.reply_id != journal.issue.author_id receivers << self.journal.issue.author end + # journal_forge_messages = ForgeMessage.new receivers.each do |r| - journal.forge_messages << ForgeMessage.new(:user_id =>r, :project_id => journal.issue.project, :viewed => false) + journal.forge_messages << ForgeMessage.new(:user_id =>r.id, :project_id => journal.issue.project_id, :viewed => false) end # if self.user_id != self.journal_reply.user_id