feat(perf): Cache labels on the conversation model (#8527)

This commit is contained in:
Pranav Raj S
2023-12-11 18:27:55 -08:00
committed by GitHub
parent 79412ba2c6
commit 890515edfd
9 changed files with 48 additions and 53 deletions

View File

@@ -14,7 +14,8 @@ class Api::V1::Accounts::Conversations::AssignmentsController < Api::V1::Account
def set_agent
@agent = Current.account.users.find_by(id: params[:assignee_id])
@conversation.update_assignee(@agent)
@conversation.assignee = @agent
@conversation.save!
render_agent
end

View File

@@ -110,8 +110,8 @@ class Api::V1::Accounts::ConversationsController < Api::V1::Accounts::BaseContro
end
def assign_conversation
@agent = Current.account.users.find(current_user.id)
@conversation.update_assignee(@agent)
@conversation.assignee = current_user
@conversation.save!
end
def conversation