| @@ -49,9 +49,9 @@ class TouchWebhookJob < ApplicationJob | |||||
| when 'IssueComment' | when 'IssueComment' | ||||
| issue_id, sender_id, comment_id, action_type, comment_json = args[0], args[1], args[2], args[3], args[4] | issue_id, sender_id, comment_id, action_type, comment_json = args[0], args[1], args[2], args[3], args[4] | ||||
| issue = Issue.find_by_id issue_id | issue = Issue.find_by_id issue_id | ||||
| comment = issue.comment_journals.find_by_id comment_id | |||||
| sender = User.find_by_id sender_id | sender = User.find_by_id sender_id | ||||
| return if issue.nil? || sender.nil? | |||||
| return if issue.nil? || sender.nil? | |||||
| comment = issue.comment_journals.find_by_id comment_id | |||||
| return if action_type == 'edited' && comment_json.blank? | return if action_type == 'edited' && comment_json.blank? | ||||
| issue.project.webhooks.each do |webhook| | issue.project.webhooks.each do |webhook| | ||||
| @@ -63,10 +63,10 @@ class TouchWebhookJob < ApplicationJob | |||||
| when 'PullRequestComment' | when 'PullRequestComment' | ||||
| issue_id, sender_id, comment_id, action_type, comment_json = args[0], args[1], args[2], args[3], args[4] | issue_id, sender_id, comment_id, action_type, comment_json = args[0], args[1], args[2], args[3], args[4] | ||||
| issue = Issue.find_by_id(issue_id) | issue = Issue.find_by_id(issue_id) | ||||
| comment = issue.comment_journals.find_by_id comment_id | |||||
| sender = User.find_by_id sender_id | sender = User.find_by_id sender_id | ||||
| pull = issue.try(:pull_request) | pull = issue.try(:pull_request) | ||||
| return if pull.nil? || sender.nil? | |||||
| return if issue.nil? || pull.nil? || sender.nil? | |||||
| comment = issue.comment_journals.find_by_id comment_id | |||||
| return if action_type == 'edited' && comment_json.blank? | return if action_type == 'edited' && comment_json.blank? | ||||
| pull.project.webhooks.each do |webhook| | pull.project.webhooks.each do |webhook| | ||||