fix: assignee_changed callback not getting triggered during conversation creation (#9334)
The reload method in our callback was refreshing the object and hence the saved_change_to_assignee_id? Method wasn't working in the following callbacks. This impacted the listeners subscribing to the event `ASSIGNEE_CHANGE`, `TEAM_CHANGE` etc
This commit is contained in:
@@ -38,7 +38,6 @@ module AssignmentHandler
|
||||
|
||||
def process_assignment_changes
|
||||
process_assignment_activities
|
||||
process_participant_assignment
|
||||
end
|
||||
|
||||
def process_assignment_activities
|
||||
@@ -49,10 +48,4 @@ module AssignmentHandler
|
||||
create_assignee_change_activity(user_name)
|
||||
end
|
||||
end
|
||||
|
||||
def process_participant_assignment
|
||||
return unless saved_change_to_assignee_id? && assignee_id.present?
|
||||
|
||||
conversation_participants.find_or_create_by!(user_id: assignee_id)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user