@chat21/chat21-web-widget 5.0.49 → 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/CHANGELOG.md +3 -0
- package/dist/assets/twp/chatbot-panel.html +2 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +1 -0
- package/src/app/component/message/info-message/info-message.component.scss +1 -0
- package/src/app/providers/global-settings.service.ts +3 -0
- package/src/assets/twp/chatbot-panel.html +2 -1
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +6 -3
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +12 -2
package/package.json
CHANGED
|
@@ -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);
|
|
@@ -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
|
/**
|
|
@@ -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.
|
|
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
|
|