Skip to content

Commit c8da5c4

Browse files
committed
Revert kustomer update-conversation action to upstream master version
1 parent 09b7ada commit c8da5c4

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

components/kustomer/actions/update-conversation/update-conversation.mjs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,24 @@ export default {
9797
},
9898
async run({ $ }) {
9999
try {
100+
const data = {
101+
externalId: this.externalId,
102+
name: this.name,
103+
status: this.status,
104+
priority: this.priority,
105+
direction: this.direction,
106+
tags: parseObject(this.tags),
107+
assignedUsers: parseObject(this.assignedUsers),
108+
assignedTeams: parseObject(this.assignedTeams),
109+
defaultLang: this.defaultLang,
110+
};
111+
112+
if (this.queue) data.queue = this.queue;
113+
100114
const response = await this.kustomer.updateConversation({
101115
$,
102116
conversationId: this.conversationId,
103-
data: {
104-
externalId: this.externalId,
105-
name: this.name,
106-
status: this.status,
107-
priority: this.priority,
108-
direction: this.direction,
109-
tags: parseObject(this.tags),
110-
assignedUsers: parseObject(this.assignedUsers),
111-
assignedTeams: parseObject(this.assignedTeams),
112-
defaultLang: this.defaultLang,
113-
queue: this.queueId,
114-
},
117+
data,
115118
});
116119

117120
$.export("$summary", `Conversation ${this.conversationId} updated successfully`);

0 commit comments

Comments
 (0)