From 6c08a6f749259404ace0a780e9b1033d33888a05 Mon Sep 17 00:00:00 2001 From: Kautilya Tripathi Date: Tue, 19 Mar 2019 01:11:44 +0530 Subject: [PATCH] [BUG] No new room created when conversation is closed (#13753) * Fixed livechat closed room * Fixed some analytics CSS * Fixed for API --- app/livechat/client/stylesheets/livechat.less | 4 ++++ .../client/views/app/analytics/livechatAnalytics.html | 4 ++-- app/livechat/server/api/v1/message.js | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/livechat/client/stylesheets/livechat.less b/app/livechat/client/stylesheets/livechat.less index c50056175839..f9202c377afa 100644 --- a/app/livechat/client/stylesheets/livechat.less +++ b/app/livechat/client/stylesheets/livechat.less @@ -746,6 +746,10 @@ // flex: 1; } +.border-component-td { + padding: 0.5rem; +} + .lc-analytics-chart-container { // flex-grow: 100%; flex: auto; diff --git a/app/livechat/client/views/app/analytics/livechatAnalytics.html b/app/livechat/client/views/app/analytics/livechatAnalytics.html index 9605e7588507..6ae03f99cb5f 100644 --- a/app/livechat/client/views/app/analytics/livechatAnalytics.html +++ b/app/livechat/client/views/app/analytics/livechatAnalytics.html @@ -82,7 +82,7 @@ {{#each data}} - {{name}} + {{name}} {{value}} {{/each}} @@ -97,4 +97,4 @@ {{/requiresPermission}} - \ No newline at end of file + diff --git a/app/livechat/server/api/v1/message.js b/app/livechat/server/api/v1/message.js index f1e07e8ef74f..53e05e1304f1 100644 --- a/app/livechat/server/api/v1/message.js +++ b/app/livechat/server/api/v1/message.js @@ -34,6 +34,10 @@ API.v1.addRoute('livechat/message', { throw new Meteor.Error('invalid-room'); } + if (!room.open) { + throw new Meteor.Error('room-closed'); + } + const _id = this.bodyParams._id || Random.id(); const sendMessage = {