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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user