@chat21/chat21-web-widget 5.0.49 → 5.0.51-rc.1
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 +7 -0
- package/dist/assets/twp/chatbot-panel.html +2 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/src/app/app.component.ts +2 -2
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +1 -0
- package/src/app/component/home/home.component.ts +1 -1
- 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
package/src/app/app.component.ts
CHANGED
|
@@ -1270,13 +1270,13 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1270
1270
|
/** close window chat */
|
|
1271
1271
|
windowContext['tiledesk'].close = function () {
|
|
1272
1272
|
ngZone.run(() => {
|
|
1273
|
-
windowContext['tiledesk']['angularcomponent'].component.
|
|
1273
|
+
windowContext['tiledesk']['angularcomponent'].component.onCloseWidget();
|
|
1274
1274
|
});
|
|
1275
1275
|
};
|
|
1276
1276
|
/** open window chat */
|
|
1277
1277
|
windowContext['tiledesk'].open = function () {
|
|
1278
1278
|
ngZone.run(() => {
|
|
1279
|
-
windowContext['tiledesk']['angularcomponent'].component.
|
|
1279
|
+
windowContext['tiledesk']['angularcomponent'].component.onOpenCloseWidget();
|
|
1280
1280
|
});
|
|
1281
1281
|
};
|
|
1282
1282
|
/** set state PreChatForm close/open */
|
|
@@ -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);
|
|
@@ -107,7 +107,7 @@ export class HomeComponent implements OnInit, AfterViewInit {
|
|
|
107
107
|
if(platform === 'telegram'){
|
|
108
108
|
window.open('https://telegram.me/'+this.g.telegramUsername, '_blank')
|
|
109
109
|
}else if(platform === 'whatsapp'){
|
|
110
|
-
window.open('https://wa.me/'+this.g.whatsappNumber, '_blank')
|
|
110
|
+
window.open('https://wa.me/'+this.g.whatsappNumber+'?text=/start', '_blank')
|
|
111
111
|
}else if(platform=== 'messanger'){
|
|
112
112
|
window.open('https://m.me/'+this.g.messangerPageTitle, '_blank')
|
|
113
113
|
}
|
|
@@ -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
|
|