diff --git a/LICENSE b/LICENSE
index d33c61692..a33852dca 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2017-2019 ThoughtWoot Inc.
+Copyright (c) 2017-2020 ThoughtWoot Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index da9390062..b31a194e1 100644
--- a/README.md
+++ b/README.md
@@ -64,4 +64,4 @@ Thanks goes to all these [wonderful people](https://www.chatwoot.com/docs/contri
-*Chatwoot* © 2017-2019, ThoughtWoot Inc - Released under the MIT License.
+*Chatwoot* © 2017-2020, ThoughtWoot Inc - Released under the MIT License.
diff --git a/app/controllers/api/v1/widget/messages_controller.rb b/app/controllers/api/v1/widget/messages_controller.rb
index 69a84e31b..ae6ae7902 100644
--- a/app/controllers/api/v1/widget/messages_controller.rb
+++ b/app/controllers/api/v1/widget/messages_controller.rb
@@ -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
diff --git a/app/javascript/dashboard/api/contacts.js b/app/javascript/dashboard/api/contacts.js
new file mode 100644
index 000000000..2addd9ce1
--- /dev/null
+++ b/app/javascript/dashboard/api/contacts.js
@@ -0,0 +1,9 @@
+import ApiClient from './ApiClient';
+
+class ContactAPI extends ApiClient {
+ constructor() {
+ super('contacts');
+ }
+}
+
+export default new ContactAPI();
diff --git a/app/javascript/dashboard/assets/scss/_mixins.scss b/app/javascript/dashboard/assets/scss/_mixins.scss
index 0b7a73c2c..c0cf98494 100644
--- a/app/javascript/dashboard/assets/scss/_mixins.scss
+++ b/app/javascript/dashboard/assets/scss/_mixins.scss
@@ -217,3 +217,9 @@
border-left: $size solid transparent;
}
}
+
+@mixin text-ellipsis {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
diff --git a/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue b/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue
index 39b13c579..1c4c0c869 100644
--- a/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/ConversationHeader.vue
@@ -8,7 +8,7 @@
:username="chat.meta.sender.name"
/>