Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Bug Fix ] change json tag for ConversationMessage field in Conversation struct #136

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

anshal21
Copy link

@anshal21 anshal21 commented Mar 13, 2021

Why?

As per the conversation model documentation here https://developers.intercom.com/intercom-api-reference/reference#conversation-model
It does not have any field with the name conversation_message and there is no such field available in the response as well

Though as per the code comments

// A ConversationMessage is the message that started the conversation rendered for presentation

Which maps to the source field mentioned in the documentation

The Conversation Part that originated this conversation, which can be Contact, Admin, Campaign, Automated or Operator initiated.

Based on this, we should be populating the ConversationMessage struct from the source field in the response

How?

Technical details on your change

  • Changed the json tag for ConversationMessage field in the Conversation struct from conversation_message to source, which fixes the issue

@anshal21 anshal21 changed the title change json tag for ConversationMessage field in Conversation struct [ Bug Fix ] change json tag for ConversationMessage field in Conversation struct Mar 13, 2021
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.

2 participants