@chat21/chat21-web-widget 5.0.49-rc.1 → 5.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-web-widget",
3
3
  "author": "Tiledesk SRL",
4
- "version": "5.0.49-rc.1",
4
+ "version": "5.0.50",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -578,6 +578,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
578
578
 
579
579
  /* SEND FIRST MESSAGE if preChatForm has 'firstMessage' key */
580
580
  this.sendFirstMessagePreChatForm()
581
+ // this.sendLivePage()
581
582
 
582
583
  this.logger.debug('[CONV-COMP] DETTAGLIO CONV - messages **************', this.messages);
583
584
  this.chatManager.addConversationHandler(this.conversationHandlerService);
@@ -27,6 +27,7 @@
27
27
 
28
28
  a {
29
29
  word-break: break-all;
30
+ color: #3880ff !important;
30
31
  }
31
32
  }
32
33
 
@@ -1832,6 +1832,9 @@ export class GlobalSettingsService {
1832
1832
  }
1833
1833
  //remove default department from list
1834
1834
  this.globals.departments = this.globals.departments.filter(obj => obj['default'] !== true)
1835
+ if(this.globals.departments && this.globals.departments.length === 1){
1836
+ this.setDepartment(this.globals.departments[0])
1837
+ }
1835
1838
  }
1836
1839
 
1837
1840
  /**
@@ -253,7 +253,8 @@
253
253
  marginY: "50px",
254
254
  calloutTimer: 1,
255
255
  singleConversation: true,
256
- restartConversation: true
256
+ restartConversation: true,
257
+ hideCloseConversationOptionMenu: true
257
258
  // autostart: false
258
259
 
259
260
  };
@@ -421,12 +421,15 @@ export class FirebaseConversationHandler extends ConversationHandlerService {
421
421
  subject = message.attributes.messagelabel.parameters.member_id;
422
422
  }
423
423
  message.text = subject + ' ' + INFO_SUPPORT_MEMBER_LEFT_GROUP ;
424
- }else if(message.attributes.messagelabel && message.attributes.messagelabel.key === LIVE_PAGE){
424
+ } else if(message.attributes.messagelabel && message.attributes.messagelabel.key === LIVE_PAGE){
425
425
  let sourceUrl: string = '';
426
426
  if(message.attributes && message.attributes.sourcePage){
427
- sourceUrl = message.attributes.sourcePage
427
+ sourceUrl = message.attributes.sourcePage
428
428
  }
429
- message.text= INFO_SUPPORT_LIVE_PAGE + ' ' + sourceUrl
429
+ if(message.attributes && message.attributes.sourceTitle){
430
+ sourceUrl = '['+message.attributes.sourceTitle+']('+sourceUrl+')'
431
+ }
432
+ message.text= INFO_SUPPORT_LIVE_PAGE + ': ' + sourceUrl
430
433
  }
431
434
  }
432
435
 
@@ -1,4 +1,4 @@
1
- import { TOUCHING_OPERATOR } from './../../utils/constants';
1
+ import { LIVE_PAGE, TOUCHING_OPERATOR } from './../../utils/constants';
2
2
  import { Inject, Injectable } from '@angular/core';
3
3
  import { BehaviorSubject } from 'rxjs';
4
4
 
@@ -328,7 +328,8 @@ export class MQTTConversationHandler extends ConversationHandlerService {
328
328
  const INFO_SUPPORT_LEAD_UPDATED = this.translationMap.get('INFO_SUPPORT_LEAD_UPDATED');
329
329
  const INFO_SUPPORT_MEMBER_LEFT_GROUP = this.translationMap.get('INFO_SUPPORT_MEMBER_LEFT_GROUP');
330
330
  const INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU = this.translationMap.get('INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU');
331
-
331
+ const INFO_SUPPORT_LIVE_PAGE = this.translationMap.get('INFO_SUPPORT_LIVE_PAGE');
332
+
332
333
  if (message.attributes.messagelabel
333
334
  && message.attributes.messagelabel.parameters
334
335
  && message.attributes.messagelabel.key === MEMBER_JOINED_GROUP
@@ -375,6 +376,15 @@ export class MQTTConversationHandler extends ConversationHandlerService {
375
376
  subject = message.attributes.messagelabel.parameters.member_id;
376
377
  }
377
378
  message.text = subject + ' ' + INFO_SUPPORT_MEMBER_LEFT_GROUP ;
379
+ } else if(message.attributes.messagelabel && message.attributes.messagelabel.key === LIVE_PAGE){
380
+ let sourceUrl: string = '';
381
+ if(message.attributes && message.attributes.sourcePage){
382
+ sourceUrl = message.attributes.sourcePage
383
+ }
384
+ if(message.attributes && message.attributes.sourceTitle){
385
+ sourceUrl = '['+message.attributes.sourceTitle+']('+sourceUrl+')'
386
+ }
387
+ message.text= INFO_SUPPORT_LIVE_PAGE + ': ' + sourceUrl
378
388
  }
379
389
  }
380
390