fix: message_type in widget conversation create end point (#10120)

The `before_type_cast` method sometimes returns a string for
`message_type`, creating inconsistencies in conversation create API
response.
This commit is contained in:
Muhsin Keloth
2024-09-16 22:34:09 +05:30
committed by GitHub
parent 5d52e4e0a6
commit 467700499b
2 changed files with 30 additions and 13 deletions

View File

@@ -11,6 +11,8 @@ class Api::V1::Widget::ConversationsController < Api::V1::Widget::BaseController
process_update_contact
@conversation = create_conversation
conversation.messages.create!(message_params)
# TODO: Temporary fix for message type cast issue, since message_type is returning as string instead of integer
conversation.reload
end
end