Skip to content

feat: Add inbox support to message variables handling#47

Merged
muhsin-k merged 4 commits into
chatwoot:mainfrom
ThanhKhoaIT:main
Jul 15, 2025
Merged

feat: Add inbox support to message variables handling#47
muhsin-k merged 4 commits into
chatwoot:mainfrom
ThanhKhoaIT:main

Conversation

@ThanhKhoaIT

Copy link
Copy Markdown
Contributor

This pull request includes changes to the src/canned.ts and test/canned.test.ts files to add support for the Inbox entity in the message variables. The changes also include updates to the Conversation interface in src/types/conversation.ts.

Add support for Inbox entity:

  • src/canned.ts: Added Inbox to the imports and updated the getMessageVariables function to include inbox in the parameters and return object. [1] [2] [3]
  • src/types/conversation.ts: Added a new Inbox interface with id and name properties.

Update tests to include Inbox:

  • test/canned.test.ts: Updated the variables object to include inbox.id and inbox.name.
  • Added new test cases for conversation.code and inbox.name.
  • Updated the getMessageVariables tests to include inbox. [1] [2] [3] [4]

@sojan-official

Copy link
Copy Markdown
Member

@iamsivin could you take this forward ?

@iamsivin iamsivin requested a review from muhsin-k July 15, 2025 08:54
@muhsin-k muhsin-k assigned muhsin-k and unassigned iamsivin Jul 15, 2025
Comment thread src/canned.ts Outdated
'contact.phone': sender?.phone_number,
'contact.id': sender?.id,
'conversation.id': id,
'conversation.code': conversation.code,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like conversation.code doesn't exist

@muhsin-k muhsin-k merged commit 3038df1 into chatwoot:main Jul 15, 2025
4 of 5 checks passed
@muhsin-k muhsin-k changed the title feat: add inbox support to message variables handling feat: Add inbox support to message variables handling Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants