diff --git a/app/jobs/touch_webhook_job.rb b/app/jobs/touch_webhook_job.rb index 061d5ece7..8319a9d66 100644 --- a/app/jobs/touch_webhook_job.rb +++ b/app/jobs/touch_webhook_job.rb @@ -52,6 +52,7 @@ class TouchWebhookJob < ApplicationJob comment = issue.comment_journals.find_by_id comment_id sender = User.find_by_id sender_id return if issue.nil? || sender.nil? + return if action_type == 'edited' && comment_json.blank? issue.project.webhooks.each do |webhook| next unless webhook.events["events"]["issue_comment"] @@ -66,6 +67,7 @@ class TouchWebhookJob < ApplicationJob sender = User.find_by_id sender_id pull = issue.try(:pull_request) return if pull.nil? || sender.nil? + return if action_type == 'edited' && comment_json.blank? pull.project.webhooks.each do |webhook| next unless webhook.events["events"]["pull_request_comment"] diff --git a/app/services/api/v1/issues/journals/update_service.rb b/app/services/api/v1/issues/journals/update_service.rb index 0b56dd303..2e27d53ea 100644 --- a/app/services/api/v1/issues/journals/update_service.rb +++ b/app/services/api/v1/issues/journals/update_service.rb @@ -38,7 +38,7 @@ class Api::V1::Issues::Journals::UpdateService < ApplicationService # @信息发送 AtmeService.call(current_user, @atme_receivers, @created_journal) unless receivers_login.blank? - TouchWebhookJob.perform_later('IssueComment', @issue&.id, @current_user.id, @updated_journal.id, 'edited', @updated_journal.previous_changes.stringify_keys) + TouchWebhookJob.perform_later('IssueComment', @issue&.id, @current_user.id, @updated_journal.id, 'edited', @updated_journal.previous_changes.slice(:notes).stringify_keys) unlock("Api::V1::Issues::Journals::UpdateService:#{@issue.id}:#{@journal.id}")