Skip to content

Commit

Permalink
Merge pull request #105 from freshworks/convpropschanges
Browse files Browse the repository at this point in the history
[FC-114687] Add new actor source
  • Loading branch information
ShashaankKrishnatray authored Oct 16, 2023
2 parents 7a52b23 + b63f820 commit a85760b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/marketplace-models/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@freshworks-jaya/marketplace-models",
"version": "0.1.25",
"version": "0.1.26",
"description": "Provides type definitions for models in marketplace product events",
"repository": "[email protected]:freshdesk/jaya-lib.git",
"main": "lib/index.js",
Expand Down
1 change: 1 addition & 0 deletions packages/marketplace-models/src/types/PayloadData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export interface ReplyPart {
}

export interface Actor {
actor_source?: string;
avatar: {
url: string;
};
Expand Down
4 changes: 2 additions & 2 deletions packages/rule-engine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@freshworks-jaya/rule-engine",
"version": "0.17.25-beta-02",
"version": "0.17.25-beta-03",
"description": "Provides methods to process rules in product events in marketplace app",
"repository": "[email protected]:freshdesk/jaya-lib.git",
"main": "lib/index.js",
Expand Down Expand Up @@ -46,7 +46,7 @@
"dependencies": {
"@freshworks-jaya/freshchat-api": "0.7.33-beta-09",
"@freshworks-jaya/kairos-api": "^0.1.5",
"@freshworks-jaya/marketplace-models": "0.1.25",
"@freshworks-jaya/marketplace-models": "0.1.26",
"@freshworks-jaya/utilities": "^1.0.0",
"@google-cloud/logging": "^9.3.1",
"axios": "^0.21.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export default (productEvent: Event, productEventData: ProductEventData, trigger

return (
productEvent === Event.ConversationUpdate &&
productEventData.actor?.actor_source != null &&
productEventData.actor?.actor_source != 'API' &&
!!productEventData.changes.model_changes &&
(!!productEventData.changes.model_changes.assigned_agent_id ||
!!productEventData.changes.model_changes.assigned_group_id ||
Expand Down

0 comments on commit a85760b

Please sign in to comment.