Feature: Contact Panel with conversation details (#397)
* Add Contact panel changes * Fix parent iframe blocked * Add Conversation Panel, Contact messages * Update contact panel with conversation details * Update designs in sidebar * Fix specs * Specs: Add specs for conversationMetadata and contact modules * Fix currentUrl issues * Fix spelling * Set default to empty string
This commit is contained in:
parent
434d6c2656
commit
439e064d90
28 changed files with 662 additions and 42 deletions
|
@ -38,7 +38,9 @@ class Api::V1::Widget::MessagesController < ActionController::Base
|
|||
inbox_id: inbox.id,
|
||||
contact_id: cookie_params[:contact_id],
|
||||
additional_attributes: {
|
||||
browser: browser_params
|
||||
browser: browser_params,
|
||||
referer: permitted_params[:message][:referer_url],
|
||||
initiated_at: timestamp_params
|
||||
}
|
||||
}
|
||||
end
|
||||
|
@ -53,6 +55,12 @@ class Api::V1::Widget::MessagesController < ActionController::Base
|
|||
}
|
||||
end
|
||||
|
||||
def timestamp_params
|
||||
{
|
||||
timestamp: permitted_params[:message][:timestamp]
|
||||
}
|
||||
end
|
||||
|
||||
def inbox
|
||||
@inbox ||= ::Inbox.find_by(id: cookie_params[:inbox_id])
|
||||
end
|
||||
|
@ -79,7 +87,7 @@ class Api::V1::Widget::MessagesController < ActionController::Base
|
|||
end
|
||||
|
||||
def permitted_params
|
||||
params.permit(:before, message: [:content])
|
||||
params.permit(:before, message: [:content, :referer_url, :timestamp])
|
||||
end
|
||||
|
||||
def secret_key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue