Skip to content

Commit

Permalink
fix: added agentId code
Browse files Browse the repository at this point in the history
  • Loading branch information
rsarika committed Nov 11, 2024
1 parent 1be5059 commit 2a661c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/@webex/plugin-cc/src/cc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,13 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter

public async setAgentState(data: StateChange): Promise<SetStateResponse> {
try {
const agentStatusPromise = await this.services.agent.stateChange({data});
const agentStatusResponse = await this.services.agent.stateChange({
data: {...data, agentId: data.agentId || this.agentConfig.agentId},
});

this.$webex.logger.log(`file: ${CC_FILE}: SET AGENT STATUS API SUCCESS`);

return Promise.resolve(agentStatusPromise);
return agentStatusResponse;
} catch (error) {
throw getErrorDetails(error, 'setAgentState');
}
Expand Down

0 comments on commit 2a661c0

Please sign in to comment.