Skip to content

Commit

Permalink
Ensure createdBy is set for new HRM contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhand committed Dec 18, 2024
1 parent 62f76d7 commit 8c76aa3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ export const handleEvent = async (
taskId: taskSid as HrmContact['taskId'],
channelSid: channelSid ?? '',
serviceSid: (channelSid && serviceConfig.chatServiceInstanceSid) ?? '',
// We set createdBy to the workerSid because the contact is 'created' by the worker who accepts the task
createdBy: workerSid as HrmContact['createdBy'],
};

const prepopulatePath = Runtime.getFunctions()['hrm/prepopulateForm'].path;
Expand Down

0 comments on commit 8c76aa3

Please sign in to comment.