Fix live chat issues: (#15473)

- Agent filter on department form
 - Missing i18n keys
 - Random exceptions being thrown by livechat room.
pull/14635/head
pierre-lehnen-rc 6 years ago committed by Guilherme Gazzo
parent aaa95a7dca
commit e5be2db44d
  1. 4
      app/livechat/client/views/app/tabbar/visitorHistory.js
  2. 2
      app/theme/client/imports/general/base_old.css
  3. 7
      app/ui/client/views/app/room.js
  4. 4
      packages/meteor-autocomplete/client/autocomplete-client.js
  5. 3
      packages/rocketchat-i18n/i18n/en.i18n.json
  6. 3
      packages/rocketchat-i18n/i18n/pt-BR.i18n.json

@ -41,7 +41,9 @@ Template.visitorHistory.onCreated(function() {
this.autorun(() => {
const room = ChatRoom.findOne({ _id: Template.currentData().rid });
this.visitorId.set(room.v._id);
if (room) {
this.visitorId.set(room.v._id);
}
});
if (currentData && currentData.rid) {

@ -468,7 +468,7 @@ rc-old select,
}
.rc-old .-autocomplete-container {
top: auto !important;
top: auto;
width: 100%;

@ -1223,13 +1223,18 @@ Template.room.onRendered(function() {
this.autorun(() => {
const subscription = Subscriptions.findOne({ rid }, { fields: { alert: 1, unread: 1 } });
readMessage.read();
return (subscription.alert || subscription.unread) && readMessage.refreshUnreadMark(rid);
return subscription && (subscription.alert || subscription.unread) && readMessage.refreshUnreadMark(rid);
});
this.autorun(() => {
const lastMessage = this.state.get('lastMessage');
const subscription = Subscriptions.findOne({ rid }, { fields: { ls: 1 } });
if (!subscription) {
this.unreadCount.set(0);
return;
}
const count = ChatMessage.find({ rid, ts: { $lte: lastMessage, $gt: subscription && subscription.ls } }).count();
this.unreadCount.set(count);

@ -80,7 +80,7 @@ export default class AutoComplete {
this.position = settings.position || 'bottom';
this.rules = settings.rules;
this.selector = {
constainer: '.-autocomplete-container',
container: '.-autocomplete-container',
item: '.-autocomplete-item',
...settings.selector,
};
@ -392,7 +392,7 @@ export default class AutoComplete {
positionContainer() {
// First render; Pick the first item and set css whenever list gets shown
let pos = {};
const element = this.tmplInst.$(this.selector.anchor || this.$element);
const element = this.selector.anchor ? this.tmplInst.$(this.selector.anchor) : this.$element;
if (this.position === 'fixed') {
const width = element.outerWidth();

@ -240,6 +240,7 @@
"Advocacy": "Advocacy",
"After_OAuth2_authentication_users_will_be_redirected_to_this_URL": "After OAuth2 authentication, users will be redirected to an URL on this list. You can add one URL per line.",
"Agent": "Agent",
"Agents": "Agents",
"Agent_added": "Agent added",
"Agent_removed": "Agent removed",
"Alerts": "Alerts",
@ -1458,6 +1459,7 @@
"FileSize_KB": "__fileSize__ KB",
"FileSize_MB": "__fileSize__ MB",
"FileSize_Bytes": "__fileSize__ Bytes",
"Filter": "Filter",
"Financial_Services": "Financial Services",
"First_Channel_After_Login": "First Channel After Login",
"First_response_time": "First Response Time",
@ -2046,6 +2048,7 @@
"manage-user-status_description": "Permission to manage the server custom user statuses",
"Manage_Apps": "Manage Apps",
"Manage_the_App": "Manage the App",
"Managers": "Managers",
"Manager_added": "Manager added",
"Manager_removed": "Manager removed",
"Managing_assets": "Managing assets",

@ -231,6 +231,7 @@
"Advocacy": "Apoio dado",
"After_OAuth2_authentication_users_will_be_redirected_to_this_URL": "Após a autenticação OAuth2, os usuários serão redirecionados para esta URL",
"Agent": "Agente",
"Agents": "Agentes",
"Agent_added": "Agente adicionado",
"Agent_removed": "Agente removido",
"Alerts": "Alertas",
@ -1379,6 +1380,7 @@
"FileSize_KB": "__fileSize__ KB",
"FileSize_MB": "__fileSize__ MB",
"FileSize_Bytes": "__fileSize__ Bytes",
"Filter": "Filtrar",
"Financial_Services": "Serviços financeiros",
"First_Channel_After_Login": "Primeiro canal após o login",
"First_response_time": "Primeiro tempo de resposta",
@ -1919,6 +1921,7 @@
"manage-sounds_description": "Permissão para gerenciar os sons do servidor",
"Manage_Apps": "Gerenciar aplicativos",
"Manage_the_App": "Gerencie a aplicação",
"Managers": "Gerentes",
"Manager_added": "Gerente adicionado",
"Manager_removed": "Gerente removido",
"Managing_assets": "Gerenciando recursos",

Loading…
Cancel
Save