fix: duplicate activity messages
This commit is contained in:
parent
05b31f90cb
commit
0ba2969eae
2 changed files with 3 additions and 4 deletions
|
@ -195,7 +195,6 @@ class Conversation < ApplicationRecord
|
|||
private
|
||||
|
||||
def execute_after_update_commit_callbacks
|
||||
binding.pry
|
||||
notify_status_change
|
||||
create_activity
|
||||
notify_conversation_updation
|
||||
|
@ -260,7 +259,7 @@ class Conversation < ApplicationRecord
|
|||
def create_label_change(user_name)
|
||||
return unless user_name
|
||||
|
||||
previous_labels, current_labels = reload.previous_changes[:label_list]
|
||||
previous_labels, current_labels = previous_changes[:label_list]
|
||||
return unless (previous_labels.is_a? Array) && (current_labels.is_a? Array)
|
||||
|
||||
create_label_added(user_name, current_labels - previous_labels)
|
||||
|
|
|
@ -25,7 +25,7 @@ class Macros::ExecutionService < ActionService
|
|||
return if conversation_a_tweet?
|
||||
|
||||
params = { content: message[0], private: false }
|
||||
mb = Messages::MessageBuilder.new(nil, @conversation, params)
|
||||
mb = Messages::MessageBuilder.new(nil, @conversation.reload, params)
|
||||
mb.perform
|
||||
end
|
||||
|
||||
|
@ -39,7 +39,7 @@ class Macros::ExecutionService < ActionService
|
|||
return if blobs.blank?
|
||||
|
||||
params = { content: nil, private: false, attachments: blobs }
|
||||
mb = Messages::MessageBuilder.new(nil, @conversation, params)
|
||||
mb = Messages::MessageBuilder.new(nil, @conversation.reload, params)
|
||||
mb.perform
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue