chore: Enable an echo id for message create end points

This commit is contained in:
Sojan
2020-09-13 16:16:52 +05:30
parent afc062537c
commit 739c062676
3 changed files with 15 additions and 6 deletions

View File

@@ -48,6 +48,7 @@ class Api::V1::Widget::MessagesController < Api::V1::Widget::BaseController
sender: @contact,
content: permitted_params[:message][:content],
inbox_id: conversation.inbox_id,
echo_id: permitted_params[:message][:echo_id],
message_type: :incoming
}
end
@@ -116,7 +117,7 @@ class Api::V1::Widget::MessagesController < Api::V1::Widget::BaseController
end
def permitted_params
params.permit(:id, :before, :website_token, contact: [:email], message: [:content, :referer_url, :timestamp])
params.permit(:id, :before, :website_token, contact: [:email], message: [:content, :referer_url, :timestamp, :echo_id])
end
def set_message