完成issue点对点消息通知
This commit is contained in:
parent
48b93f2113
commit
200861cfef
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue