@chat21/chat21-ionic 3.0.64-rc1 → 3.0.64
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 +2 -5
- package/deploy_amazon_beta.sh +29 -0
- package/deploy_amazon_prod.sh +25 -0
- package/deploy_pre.sh +6 -78
- package/deploy_prod.sh +6 -57
- package/package.json +1 -6
- package/src/app/app.component.ts +57 -45
- package/src/app/app.module.ts +0 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +2 -2
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +1 -0
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +39 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +6 -18
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +2 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +1 -1
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +2 -2
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +2 -2
- package/src/app/directives/safe-html.pipe.ts +2 -2
- package/src/app/pages/conversation-detail/conversation-detail.page.html +2 -4
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +23 -12
- package/src/app/pages/conversations-list/conversations-list.page.html +12 -21
- package/src/app/pages/conversations-list/conversations-list.page.ts +191 -58
- package/src/app/pages/loader-preview/loader-preview.module.ts +2 -1
- package/src/app/shared/shared.module.ts +0 -4
- package/src/assets/js/chat21client.js +1 -1
- package/src/{chat-config-mqtt-ver-uploaded.json → chat-config-mqtt-localhost.json} +10 -6
- package/src/chat-config-mqtt.json +18 -28
- package/src/chat-config-native-mqtt.json +30 -0
- package/src/chat-config-pre.json +9 -13
- package/src/chat21-core/models/conversation.ts +1 -1
- package/src/chat21-core/providers/abstract/conversations-handler.service.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +8 -47
- package/src/chat21-core/utils/utils-message.ts +3 -2
- package/src/app/chatlib/conversation-detail/message/html/html.component.html +0 -1
- package/src/app/chatlib/conversation-detail/message/html/html.component.scss +0 -79
- package/src/app/chatlib/conversation-detail/message/html/html.component.spec.ts +0 -25
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -33
- package/src/chat-config-pre-test.json +0 -37
|
@@ -230,6 +230,15 @@ export class ConversationListPage implements OnInit {
|
|
|
230
230
|
this.logger.log('[CONVS-LIST-PAGE] getConversationListHeight scrollbar2element', scrollbar2element)
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
// this.support_mode = null
|
|
234
|
+
// if( this.appConfigProvider.getConfig().supportMode === true || this.appConfigProvider.getConfig().supportMode === 'true') {
|
|
235
|
+
// this.support_mode = true
|
|
236
|
+
// } else if ( this.appConfigProvider.getConfig().supportMode === false || this.appConfigProvider.getConfig().supportMode === 'false') {
|
|
237
|
+
// this.support_mode = false
|
|
238
|
+
// } else if ( !this.appConfigProvider.getConfig().supportMode ) {
|
|
239
|
+
// this.support_mode = false
|
|
240
|
+
// }
|
|
241
|
+
|
|
233
242
|
getAppConfigToHideDiplayBtns() {
|
|
234
243
|
const appConfig = this.appConfigProvider.getConfig()
|
|
235
244
|
// console.log('[CONVS-LIST-PAGE] - appConfig ', appConfig)
|
|
@@ -257,6 +266,7 @@ export class ConversationListPage implements OnInit {
|
|
|
257
266
|
this.writeto_btn = false;
|
|
258
267
|
this.logger.log('[CONVS-LIST-PAGE] getAppConfigToHideDiplayBtns writeto_btn ', this.writeto_btn)
|
|
259
268
|
}
|
|
269
|
+
// console.log('[ION-LIST-CONVS-COMP] - supportMode ', this.supportMode)
|
|
260
270
|
}
|
|
261
271
|
|
|
262
272
|
watchToConnectionStatus() {
|
|
@@ -275,7 +285,10 @@ export class ConversationListPage implements OnInit {
|
|
|
275
285
|
|
|
276
286
|
ionViewWillEnter() {
|
|
277
287
|
this.logger.log('Called ionViewDidEnter')
|
|
278
|
-
this.logger.log(
|
|
288
|
+
this.logger.log(
|
|
289
|
+
'[CONVS-LIST-PAGE] ionViewWillEnter uidConvSelected',
|
|
290
|
+
this.uidConvSelected,
|
|
291
|
+
)
|
|
279
292
|
this.listnerStart()
|
|
280
293
|
|
|
281
294
|
// exit from app with hardware back button
|
|
@@ -300,18 +313,29 @@ export class ConversationListPage implements OnInit {
|
|
|
300
313
|
openUnsevedConversationIframe(event) {
|
|
301
314
|
this.logger.log('[CONVS-LIST-PAGE] openUnsevedConversationIframe ', event)
|
|
302
315
|
this.hasClickedOpenUnservedConvIframe = true
|
|
303
|
-
this.logger.log(
|
|
316
|
+
this.logger.log(
|
|
317
|
+
'[CONVS-LIST-PAGE] - HAS CLIKED OPEN UNSERVED REQUEST IFRAME',
|
|
318
|
+
this.hasClickedOpenUnservedConvIframe,
|
|
319
|
+
)
|
|
304
320
|
const DASHBOARD_BASE_URL = this.appConfigProvider.getConfig().dashboardUrl
|
|
305
321
|
// http://localhost:4204/#/projects-for-panel
|
|
306
322
|
this.PROJECTS_FOR_PANEL_URL = DASHBOARD_BASE_URL + '#/projects-for-panel'
|
|
307
|
-
this.UNASSIGNED_CONVS_URL =
|
|
323
|
+
this.UNASSIGNED_CONVS_URL =
|
|
324
|
+
DASHBOARD_BASE_URL +
|
|
325
|
+
'#/project/' +
|
|
326
|
+
this.lastProjectId +
|
|
327
|
+
'/unserved-request-for-panel'
|
|
308
328
|
|
|
309
329
|
if (event === 'pinbtn') {
|
|
310
330
|
this.IFRAME_URL = this.PROJECTS_FOR_PANEL_URL
|
|
311
331
|
} else {
|
|
312
332
|
this.IFRAME_URL = this.UNASSIGNED_CONVS_URL
|
|
313
333
|
}
|
|
314
|
-
|
|
334
|
+
|
|
335
|
+
this.logger.log(
|
|
336
|
+
'[CONVS-LIST-PAGE] - HAS CLIKED OPEN UNSERVED REQUEST IFRAME > UNASSIGNED CONVS URL',
|
|
337
|
+
this.UNASSIGNED_CONVS_URL,
|
|
338
|
+
)
|
|
315
339
|
this.openUnassignedConversations(this.IFRAME_URL, event)
|
|
316
340
|
}
|
|
317
341
|
|
|
@@ -336,7 +360,10 @@ export class ConversationListPage implements OnInit {
|
|
|
336
360
|
try {
|
|
337
361
|
closeModal(this.modalController)
|
|
338
362
|
} catch (err) {
|
|
339
|
-
this.logger.error(
|
|
363
|
+
this.logger.error(
|
|
364
|
+
'[CONVS-LIST-PAGE] closeContactsDirectory -> error:',
|
|
365
|
+
err,
|
|
366
|
+
)
|
|
340
367
|
}
|
|
341
368
|
}
|
|
342
369
|
|
|
@@ -345,23 +372,46 @@ export class ConversationListPage implements OnInit {
|
|
|
345
372
|
const that = this
|
|
346
373
|
if (navigator && navigator.serviceWorker) {
|
|
347
374
|
navigator.serviceWorker.addEventListener('message', function (event) {
|
|
348
|
-
that.logger.log(
|
|
349
|
-
|
|
350
|
-
|
|
375
|
+
that.logger.log(
|
|
376
|
+
'[CONVS-LIST-PAGE] FIREBASE-NOTIFICATION listenToNotificationCLick - Received a message from service worker event data: ',
|
|
377
|
+
event.data,
|
|
378
|
+
)
|
|
379
|
+
that.logger.log(
|
|
380
|
+
'[CONVS-LIST-PAGE] FIREBASE-NOTIFICATION listenToNotificationCLick - Received a message from service worker event data data: ',
|
|
381
|
+
event.data['data'],
|
|
382
|
+
)
|
|
383
|
+
that.logger.log(
|
|
384
|
+
'[CONVS-LIST-PAGE] FIREBASE-NOTIFICATION listenToNotificationCLick - Received a message from service worker event data data typeof: ',
|
|
385
|
+
typeof event.data['data'],
|
|
386
|
+
)
|
|
351
387
|
let uidConvSelected = ''
|
|
352
388
|
if (event.data && event.data['conversWith']) {
|
|
353
389
|
uidConvSelected = event.data['conversWith']
|
|
354
390
|
} else {
|
|
355
|
-
that.logger.log(
|
|
391
|
+
that.logger.log(
|
|
392
|
+
'[CONVS-LIST-PAGE] FIREBASE-NOTIFICATION listenToNotificationCLick - DIFFERENT MSG',
|
|
393
|
+
)
|
|
356
394
|
return
|
|
357
395
|
}
|
|
358
396
|
|
|
359
|
-
that.logger.log(
|
|
360
|
-
|
|
361
|
-
|
|
397
|
+
that.logger.log(
|
|
398
|
+
'[CONVS-LIST-PAGE] FIREBASE-NOTIFICATION listenToNotificationCLick - Received a message from service worker event dataObjct uidConvSelected: ',
|
|
399
|
+
uidConvSelected,
|
|
400
|
+
)
|
|
401
|
+
that.logger.log(
|
|
402
|
+
'[CONVS-LIST-PAGE] FIREBASE-NOTIFICATION listenToNotificationCLick - Received a message from service worker that.conversations: ',
|
|
403
|
+
that.conversations,
|
|
404
|
+
)
|
|
405
|
+
const conversationSelected = that.conversations.find(
|
|
406
|
+
(item) => item.uid === uidConvSelected,
|
|
407
|
+
)
|
|
362
408
|
if (conversationSelected) {
|
|
363
409
|
that.conversationSelected = conversationSelected
|
|
364
|
-
that.logger.log(
|
|
410
|
+
that.logger.log(
|
|
411
|
+
'[CONVS-LIST-PAGE] listenToNotificationCLick- Received a message from service worker event conversationSelected: ',
|
|
412
|
+
that.conversationSelected,
|
|
413
|
+
)
|
|
414
|
+
|
|
365
415
|
that.navigateByUrl('active', uidConvSelected)
|
|
366
416
|
}
|
|
367
417
|
})
|
|
@@ -370,16 +420,23 @@ export class ConversationListPage implements OnInit {
|
|
|
370
420
|
|
|
371
421
|
private listnerStart() {
|
|
372
422
|
const that = this
|
|
373
|
-
this.chatManager.BSStart.pipe(takeUntil(that.unsubscribe$)).subscribe(
|
|
374
|
-
|
|
423
|
+
this.chatManager.BSStart.pipe(takeUntil(that.unsubscribe$)).subscribe(
|
|
424
|
+
(data: any) => {
|
|
425
|
+
this.logger.log(
|
|
426
|
+
'[CONVS-LIST-PAGE] - BSStart SUBSCR DATA - Current user *****',
|
|
427
|
+
data,
|
|
428
|
+
)
|
|
375
429
|
if (data) {
|
|
376
430
|
that.initialize()
|
|
377
431
|
}
|
|
378
|
-
|
|
432
|
+
},
|
|
433
|
+
(error) => {
|
|
379
434
|
this.logger.error('[CONVS-LIST-PAGE] - BSStart SUBSCR - ERROR: ', error)
|
|
380
|
-
|
|
435
|
+
},
|
|
436
|
+
() => {
|
|
381
437
|
this.logger.log('[CONVS-LIST-PAGE] - BSStart SUBSCR * COMPLETE *')
|
|
382
|
-
|
|
438
|
+
},
|
|
439
|
+
)
|
|
383
440
|
}
|
|
384
441
|
|
|
385
442
|
// ------------------------------------------------------------------ //
|
|
@@ -387,7 +444,7 @@ export class ConversationListPage implements OnInit {
|
|
|
387
444
|
// ------------------------------------------------------------------ //
|
|
388
445
|
initConversationsHandler() {
|
|
389
446
|
this.conversations = this.conversationsHandlerService.conversations
|
|
390
|
-
this.logger.log('[CONVS-LIST-PAGE] - CONVERSATIONS ', this.conversations
|
|
447
|
+
this.logger.log('[CONVS-LIST-PAGE] - CONVERSATIONS ', this.conversations)
|
|
391
448
|
// save conversationHandler in chatManager
|
|
392
449
|
this.chatManager.setConversationsHandler(this.conversationsHandlerService)
|
|
393
450
|
this.showPlaceholder = false
|
|
@@ -395,22 +452,36 @@ export class ConversationListPage implements OnInit {
|
|
|
395
452
|
|
|
396
453
|
initArchivedConversationsHandler() {
|
|
397
454
|
const keysConversation = ['CLOSED', 'Resolve']
|
|
398
|
-
this.translationMapConversation = this.translateService.translateLanguage(
|
|
455
|
+
this.translationMapConversation = this.translateService.translateLanguage(
|
|
456
|
+
keysConversation,
|
|
457
|
+
)
|
|
399
458
|
|
|
400
459
|
this.archivedConversationsHandlerService.subscribeToConversations(() => {
|
|
401
|
-
this.logger.log(
|
|
460
|
+
this.logger.log(
|
|
461
|
+
'[CONVS-LIST-PAGE]-CONVS - conversations archived length ',
|
|
462
|
+
this.archivedConversations.length,
|
|
463
|
+
)
|
|
402
464
|
})
|
|
403
465
|
|
|
404
466
|
this.archivedConversations = this.archivedConversationsHandlerService.archivedConversations
|
|
405
|
-
this.logger.log(
|
|
467
|
+
this.logger.log(
|
|
468
|
+
'[CONVS-LIST-PAGE] archived conversation',
|
|
469
|
+
this.archivedConversations,
|
|
470
|
+
)
|
|
406
471
|
|
|
407
472
|
// save archivedConversationsHandlerService in chatManager
|
|
408
473
|
this.chatManager.setArchivedConversationsHandler(
|
|
409
474
|
this.archivedConversationsHandlerService,
|
|
410
475
|
)
|
|
411
476
|
|
|
412
|
-
this.logger.log(
|
|
413
|
-
|
|
477
|
+
this.logger.log(
|
|
478
|
+
'[CONVS-LIST-PAGE]-CONVS SubscribeToConversations - conversations archived length ',
|
|
479
|
+
this.archivedConversations.length,
|
|
480
|
+
)
|
|
481
|
+
if (
|
|
482
|
+
!this.archivedConversations ||
|
|
483
|
+
this.archivedConversations.length === 0
|
|
484
|
+
) {
|
|
414
485
|
this.loadingIsActive = false
|
|
415
486
|
}
|
|
416
487
|
}
|
|
@@ -423,17 +494,26 @@ export class ConversationListPage implements OnInit {
|
|
|
423
494
|
// - for the direct conversation
|
|
424
495
|
// ----------------------------------------------------------------------------------------------------
|
|
425
496
|
listenToAppCompConvsLengthOnInitConvs() {
|
|
426
|
-
this.events.subscribe(
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
this.
|
|
430
|
-
|
|
431
|
-
|
|
497
|
+
this.events.subscribe(
|
|
498
|
+
'appcompSubscribeToConvs:loadingIsActive',
|
|
499
|
+
(loadingIsActive) => {
|
|
500
|
+
this.logger.log(
|
|
501
|
+
'[CONVS-LIST-PAGE]-CONVS loadingIsActive',
|
|
502
|
+
loadingIsActive,
|
|
503
|
+
)
|
|
504
|
+
if (loadingIsActive === false) {
|
|
505
|
+
this.loadingIsActive = false
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
)
|
|
432
509
|
}
|
|
433
510
|
|
|
434
511
|
listenGoOnline() {
|
|
435
512
|
this.events.subscribe('go:online', (goonline) => {
|
|
436
|
-
this.logger.info(
|
|
513
|
+
this.logger.info(
|
|
514
|
+
'[CONVS-LIST-PAGE] - listen To go:online - goonline',
|
|
515
|
+
goonline,
|
|
516
|
+
)
|
|
437
517
|
// this.events.unsubscribe('profileInfoButtonClick:logout')
|
|
438
518
|
if (goonline === true) {
|
|
439
519
|
this.displayNewConvsItem = true
|
|
@@ -443,7 +523,10 @@ export class ConversationListPage implements OnInit {
|
|
|
443
523
|
|
|
444
524
|
listenGoOffline() {
|
|
445
525
|
this.events.subscribe('go:offline', (offline) => {
|
|
446
|
-
this.logger.info(
|
|
526
|
+
this.logger.info(
|
|
527
|
+
'[CONVS-LIST-PAGE] - listen To go:offline - offline',
|
|
528
|
+
offline,
|
|
529
|
+
)
|
|
447
530
|
// this.events.unsubscribe('profileInfoButtonClick:logout')
|
|
448
531
|
if (offline === true) {
|
|
449
532
|
this.displayNewConvsItem = false
|
|
@@ -452,19 +535,31 @@ export class ConversationListPage implements OnInit {
|
|
|
452
535
|
}
|
|
453
536
|
|
|
454
537
|
listenToLogoutEvent() {
|
|
455
|
-
this.events.subscribe(
|
|
456
|
-
|
|
538
|
+
this.events.subscribe(
|
|
539
|
+
'profileInfoButtonClick:logout',
|
|
540
|
+
(hasclickedlogout) => {
|
|
541
|
+
this.logger.info(
|
|
542
|
+
'[CONVS-LIST-PAGE] - listenToLogoutEvent - hasclickedlogout',
|
|
543
|
+
hasclickedlogout,
|
|
544
|
+
)
|
|
457
545
|
|
|
458
546
|
this.conversations = []
|
|
459
547
|
this.conversationsHandlerService.conversations = []
|
|
460
548
|
this.uidConvSelected = null
|
|
461
549
|
|
|
462
|
-
this.logger.log(
|
|
463
|
-
|
|
550
|
+
this.logger.log(
|
|
551
|
+
'[CONVS-LIST-PAGE] - listenToLogoutEvent - CONVERSATIONS ',
|
|
552
|
+
this.conversations,
|
|
553
|
+
)
|
|
554
|
+
this.logger.log(
|
|
555
|
+
'[CONVS-LIST-PAGE] - listenToLogoutEvent - uidConvSelected ',
|
|
556
|
+
this.uidConvSelected,
|
|
557
|
+
)
|
|
464
558
|
if (hasclickedlogout === true) {
|
|
465
559
|
this.loadingIsActive = false
|
|
466
560
|
}
|
|
467
|
-
|
|
561
|
+
},
|
|
562
|
+
)
|
|
468
563
|
}
|
|
469
564
|
|
|
470
565
|
// ------------------------------------------------------------------
|
|
@@ -549,8 +644,14 @@ export class ConversationListPage implements OnInit {
|
|
|
549
644
|
subscribeLoggedUserLogout = () => {
|
|
550
645
|
this.conversations = []
|
|
551
646
|
this.uidConvSelected = null
|
|
552
|
-
this.logger.log(
|
|
553
|
-
|
|
647
|
+
this.logger.log(
|
|
648
|
+
'[CONVS-LIST-PAGE] - subscribeLoggedUserLogout conversations ',
|
|
649
|
+
this.conversations,
|
|
650
|
+
)
|
|
651
|
+
this.logger.log(
|
|
652
|
+
'[CONVS-LIST-PAGE] - subscribeLoggedUserLogout uidConvSelected ',
|
|
653
|
+
this.uidConvSelected,
|
|
654
|
+
)
|
|
554
655
|
}
|
|
555
656
|
|
|
556
657
|
// ------------------------------------------------------------------------------------
|
|
@@ -558,10 +659,15 @@ export class ConversationListPage implements OnInit {
|
|
|
558
659
|
// ------------------------------------------------------------------------------------
|
|
559
660
|
conversationsChanged = (conversations: ConversationModel[]) => {
|
|
560
661
|
this.numberOpenConv = this.conversationsHandlerService.countIsNew()
|
|
561
|
-
this.logger.log(
|
|
662
|
+
this.logger.log(
|
|
663
|
+
'[CONVS-LIST-PAGE] - conversationsChanged - NUMB OF CONVERSATIONS: ',
|
|
664
|
+
this.numberOpenConv,
|
|
665
|
+
)
|
|
562
666
|
// console.log('conversationsChanged »»»»»»»»» uidConvSelected', that.conversations[0], that.uidConvSelected);
|
|
563
667
|
if (this.uidConvSelected && !this.conversationSelected) {
|
|
564
|
-
const conversationSelected = this.conversations.find(
|
|
668
|
+
const conversationSelected = this.conversations.find(
|
|
669
|
+
(item) => item.uid === this.uidConvSelected,
|
|
670
|
+
)
|
|
565
671
|
if (conversationSelected) {
|
|
566
672
|
this.conversationSelected = conversationSelected
|
|
567
673
|
this.setUidConvSelected(this.uidConvSelected)
|
|
@@ -578,13 +684,26 @@ export class ConversationListPage implements OnInit {
|
|
|
578
684
|
// !!!!!! IS USED? ?????
|
|
579
685
|
// ------------------------------
|
|
580
686
|
subscribeChangedConversationSelected = (user: UserModel, type: string) => {
|
|
581
|
-
this.logger.log(
|
|
687
|
+
this.logger.log(
|
|
688
|
+
'[CONVS-LIST-PAGE] ************** subscribeUidConvSelectedChanged navigateByUrl',
|
|
689
|
+
user,
|
|
690
|
+
type,
|
|
691
|
+
)
|
|
582
692
|
this.uidConvSelected = user.uid
|
|
583
|
-
this.logger.log(
|
|
693
|
+
this.logger.log(
|
|
694
|
+
'[CONVS-LIST-PAGE] ************** uidConvSelected ',
|
|
695
|
+
this.uidConvSelected,
|
|
696
|
+
)
|
|
584
697
|
// this.conversationsHandlerService.uidConvSelected = user.uid;
|
|
585
|
-
const conversationSelected = this.conversations.find(
|
|
698
|
+
const conversationSelected = this.conversations.find(
|
|
699
|
+
(item) => item.uid === this.uidConvSelected,
|
|
700
|
+
)
|
|
586
701
|
if (conversationSelected) {
|
|
587
|
-
this.logger.log(
|
|
702
|
+
this.logger.log(
|
|
703
|
+
'[CONVS-LIST-PAGE] --> uidConvSelected: ',
|
|
704
|
+
this.conversationSelected,
|
|
705
|
+
this.uidConvSelected,
|
|
706
|
+
)
|
|
588
707
|
this.conversationSelected = conversationSelected
|
|
589
708
|
}
|
|
590
709
|
// this.router.navigateByUrl('conversation-detail/' + user.uid + '?conversationWithFullname=' + user.fullname);
|
|
@@ -595,7 +714,10 @@ export class ConversationListPage implements OnInit {
|
|
|
595
714
|
* evento richiamato quando si seleziona bottone profile-info-modal
|
|
596
715
|
*/
|
|
597
716
|
subscribeProfileInfoButtonClicked = (event: string) => {
|
|
598
|
-
this.logger.log(
|
|
717
|
+
this.logger.log(
|
|
718
|
+
'[CONVS-LIST-PAGE] ************** subscribeProfileInfoButtonClicked: ',
|
|
719
|
+
event,
|
|
720
|
+
)
|
|
599
721
|
if (event === 'displayArchived') {
|
|
600
722
|
this.initArchivedConversationsHandler()
|
|
601
723
|
// this.openArchivedConversationsModal()
|
|
@@ -605,11 +727,15 @@ export class ConversationListPage implements OnInit {
|
|
|
605
727
|
const keys = ['LABEL_ARCHIVED']
|
|
606
728
|
// const keys = ['History'];
|
|
607
729
|
|
|
608
|
-
this.headerTitle = this.translateService
|
|
730
|
+
this.headerTitle = this.translateService
|
|
731
|
+
.translateLanguage(keys)
|
|
732
|
+
.get(keys[0])
|
|
609
733
|
} else if (event === 'displayContact') {
|
|
610
734
|
this.conversationType = 'archived'
|
|
611
735
|
const keys = ['LABEL_CONTACTS']
|
|
612
|
-
this.headerTitle = this.translateService
|
|
736
|
+
this.headerTitle = this.translateService
|
|
737
|
+
.translateLanguage(keys)
|
|
738
|
+
.get(keys[0])
|
|
613
739
|
}
|
|
614
740
|
}
|
|
615
741
|
|
|
@@ -657,7 +783,10 @@ export class ConversationListPage implements OnInit {
|
|
|
657
783
|
initialize() {
|
|
658
784
|
const appconfig = this.appConfigProvider.getConfig()
|
|
659
785
|
this.tenant = appconfig.firebaseConfig.tenant
|
|
660
|
-
this.logger.log(
|
|
786
|
+
this.logger.log(
|
|
787
|
+
'[CONVS-LIST-PAGE] - initialize -> firebaseConfig tenant ',
|
|
788
|
+
this.tenant,
|
|
789
|
+
)
|
|
661
790
|
|
|
662
791
|
if (this.tiledeskAuthService.getCurrentUser()) {
|
|
663
792
|
this.loggedUserUid = this.tiledeskAuthService.getCurrentUser().uid
|
|
@@ -684,18 +813,22 @@ export class ConversationListPage implements OnInit {
|
|
|
684
813
|
// It only works on BSStart.subscribe! it is useful or can be eliminated
|
|
685
814
|
// --------------------------------------------------------
|
|
686
815
|
initVariables() {
|
|
687
|
-
this.logger.log(
|
|
816
|
+
this.logger.log(
|
|
817
|
+
'[CONVS-LIST-PAGE] uidReciverFromUrl:: ' + this.uidReciverFromUrl,
|
|
818
|
+
)
|
|
688
819
|
this.logger.log('[CONVS-LIST-PAGE] loggedUserUid:: ' + this.loggedUserUid)
|
|
689
820
|
this.logger.log('[CONVS-LIST-PAGE] tenant:: ' + this.tenant)
|
|
690
821
|
if (this.route.component['name'] !== 'ConversationListPage') {
|
|
691
822
|
if (this.route && this.route.snapshot && this.route.snapshot.firstChild) {
|
|
692
823
|
const IDConv = this.route.snapshot.firstChild.paramMap.get('IDConv')
|
|
693
|
-
const convType = this.route.snapshot.firstChild.paramMap.get('Convtype')
|
|
694
824
|
this.logger.log('[CONVS-LIST-PAGE] conversationWith 2: ', IDConv)
|
|
695
825
|
if (IDConv) {
|
|
696
|
-
this.setUidConvSelected(IDConv
|
|
826
|
+
this.setUidConvSelected(IDConv)
|
|
697
827
|
} else {
|
|
698
|
-
this.logger.log(
|
|
828
|
+
this.logger.log(
|
|
829
|
+
'[CONVS-LIST-PAGE] conversationWith 2 (else): ',
|
|
830
|
+
IDConv,
|
|
831
|
+
)
|
|
699
832
|
}
|
|
700
833
|
}
|
|
701
834
|
}
|
|
@@ -713,11 +846,9 @@ export class ConversationListPage implements OnInit {
|
|
|
713
846
|
let conversationSelected
|
|
714
847
|
if (conversationType === 'active') {
|
|
715
848
|
conversationSelected = this.conversations.find((item) => item.uid === this.uidConvSelected)
|
|
716
|
-
} else if (conversationType === 'archived') {
|
|
717
|
-
conversationSelected = this.archivedConversations.find((item) => item.uid === this.uidConvSelected)
|
|
718
|
-
}
|
|
849
|
+
} else if (conversationType === 'archived') { conversationSelected = this.archivedConversations.find((item) => item.uid === this.uidConvSelected) }
|
|
719
850
|
if (conversationSelected) {
|
|
720
|
-
this.logger.log('[CONVS-LIST-PAGE] conversationSelected', conversationSelected)
|
|
851
|
+
this.logger.log('[CONVS-LIST-PAGE] conversationSelected', conversationSelected,)
|
|
721
852
|
this.logger.log('[CONVS-LIST-PAGE] the conversation ', this.conversationSelected, ' has already been loaded')
|
|
722
853
|
this.conversationSelected = conversationSelected
|
|
723
854
|
this.logger.log('[CONVS-LIST-PAGE] setUidConvSelected: ', this.conversationSelected)
|
|
@@ -751,7 +882,9 @@ export class ConversationListPage implements OnInit {
|
|
|
751
882
|
conversation_with_fullname = conversation.recipient_fullname
|
|
752
883
|
}
|
|
753
884
|
if (!conversation_with.startsWith('support-group')) {
|
|
754
|
-
conversation.image = this.imageRepoService.getImagePhotoUrl(
|
|
885
|
+
conversation.image = this.imageRepoService.getImagePhotoUrl(
|
|
886
|
+
conversation_with,
|
|
887
|
+
)
|
|
755
888
|
}
|
|
756
889
|
}
|
|
757
890
|
|
|
@@ -7,6 +7,7 @@ import { LoaderPreviewPage } from './loader-preview.page';
|
|
|
7
7
|
import { TranslateLoader, TranslateModule} from '@ngx-translate/core';
|
|
8
8
|
import { createTranslateLoader } from '../../../chat21-core/utils/utils';
|
|
9
9
|
import { HttpClient } from '@angular/common/http';
|
|
10
|
+
import { SafeHtmlPipe } from 'src/app/directives/safe-html.pipe';
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
@NgModule({
|
|
@@ -23,6 +24,6 @@ import { HttpClient } from '@angular/common/http';
|
|
|
23
24
|
}
|
|
24
25
|
})
|
|
25
26
|
],
|
|
26
|
-
declarations: [LoaderPreviewPage]
|
|
27
|
+
declarations: [LoaderPreviewPage, SafeHtmlPipe]
|
|
27
28
|
})
|
|
28
29
|
export class LoaderPreviewPageModule {}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { HtmlComponent } from './../chatlib/conversation-detail/message/html/html.component';
|
|
2
1
|
import { BubbleOthersMessageComponent } from './../components/conversation-detail/bubble-others-message/bubble-others-message.component';
|
|
3
2
|
|
|
4
3
|
import { TextComponent } from '../chatlib/conversation-detail/message/text/text.component';
|
|
@@ -47,7 +46,6 @@ import { DefaultTooltipOptions } from 'src/chat21-core/utils/utils';
|
|
|
47
46
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
48
47
|
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
49
48
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
50
|
-
import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
51
49
|
|
|
52
50
|
// import { MessageTextAreaComponent } from '../components/conversation-detail/message-text-area/message-text-area.component'; // MessageTextAreaComponent is part of the declarations ConversationDetailPageModule
|
|
53
51
|
|
|
@@ -77,7 +75,6 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
|
77
75
|
InfoMessageComponent,
|
|
78
76
|
ReturnReceiptComponent,
|
|
79
77
|
TextComponent,
|
|
80
|
-
HtmlComponent,
|
|
81
78
|
BubbleDayMessageComponent,
|
|
82
79
|
BubbleSystemMessageComponent,
|
|
83
80
|
BubbleMyMessageComponent,
|
|
@@ -90,7 +87,6 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
|
90
87
|
MarkedPipe,
|
|
91
88
|
AutofocusDirective,
|
|
92
89
|
HtmlEntitiesEncodePipe,
|
|
93
|
-
SafeHtmlPipe,
|
|
94
90
|
OptionHeaderComponent
|
|
95
91
|
],
|
|
96
92
|
exports: [
|
|
@@ -962,7 +962,7 @@ class Chat21Client {
|
|
|
962
962
|
}
|
|
963
963
|
if (this.log) {console.log("starting mqtt connection with LWT on:", presence_topic, this.endpoint)}
|
|
964
964
|
// client = mqtt.connect('mqtt://127.0.0.1:15675/ws',options)
|
|
965
|
-
this.client = mqtt.connect(
|
|
965
|
+
this.client = mqtt.connect('a://99.80.197.164:15675/ws',options)
|
|
966
966
|
|
|
967
967
|
this.client.on('connect', // TODO if token is wrong it must reply with an error!
|
|
968
968
|
() => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"chatEngine": "mqtt",
|
|
3
3
|
"uploadEngine": "native",
|
|
4
|
+
"pushEngine": "none",
|
|
4
5
|
"firebaseConfig": {
|
|
5
6
|
"apiKey": "AIzaSyCoWXHNvP1-qOllCpTshhC6VjPXeRTK0T4",
|
|
6
7
|
"authDomain": "chat21-pre-01.firebaseapp.com",
|
|
@@ -9,14 +10,17 @@
|
|
|
9
10
|
"storageBucket": "chat21-pre-01.appspot.com",
|
|
10
11
|
"messagingSenderId": "269505353043",
|
|
11
12
|
"appId": "1:269505353043:web:b82af070572669e3707da6",
|
|
12
|
-
"chat21ApiUrl": "https://us-central1-chat21-pre-01.cloudfunctions.net"
|
|
13
|
+
"chat21ApiUrl": "https://us-central1-chat21-pre-01.cloudfunctions.net",
|
|
14
|
+
"tenant":"tilechat"
|
|
13
15
|
},
|
|
14
16
|
"chat21Config": {
|
|
15
17
|
"appId": "tilechat",
|
|
16
|
-
"MQTTendpoint": "
|
|
17
|
-
"APIendpoint": "http://
|
|
18
|
+
"MQTTendpoint": "ws://localhost:15675/ws",
|
|
19
|
+
"APIendpoint": "http://localhost:8004/api"
|
|
18
20
|
},
|
|
19
|
-
"apiUrl": "http://
|
|
20
|
-
"baseImageUrl": "
|
|
21
|
-
"dashboardUrl": "http://
|
|
21
|
+
"apiUrl": "http://localhost:3000/",
|
|
22
|
+
"baseImageUrl": "http://localhost:3000/",
|
|
23
|
+
"dashboardUrl": "http://localhost:3000/",
|
|
24
|
+
"logLevel": "DEBUG",
|
|
25
|
+
"authPersistence": "NONE"
|
|
22
26
|
}
|
|
@@ -1,36 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
"t2y12PruGU9wUtEGzBJfolMIgK": "",
|
|
3
2
|
"chatEngine": "mqtt",
|
|
4
3
|
"uploadEngine": "native",
|
|
5
|
-
"pushEngine":"
|
|
6
|
-
"fileUploadAccept":"*/*",
|
|
7
|
-
"logLevel":"info",
|
|
8
|
-
"authPersistence": "LOCAL",
|
|
9
|
-
"supportMode": "true",
|
|
10
|
-
"writeToButton": "true",
|
|
11
|
-
"archivedButton": "true",
|
|
4
|
+
"pushEngine": "mqtt",
|
|
12
5
|
"firebaseConfig": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"vapidKey": ""
|
|
6
|
+
"apiKey": "AIzaSyCoWXHNvP1-qOllCpTshhC6VjPXeRTK0T4",
|
|
7
|
+
"authDomain": "chat21-pre-01.firebaseapp.com",
|
|
8
|
+
"databaseURL": "https://chat21-pre-01.firebaseio.com",
|
|
9
|
+
"projectId": "chat21-pre-01",
|
|
10
|
+
"storageBucket": "chat21-pre-01.appspot.com",
|
|
11
|
+
"messagingSenderId": "269505353043",
|
|
12
|
+
"appId": "1:269505353043:web:b82af070572669e3707da6",
|
|
13
|
+
"chat21ApiUrl": "https://us-central1-chat21-pre-01.cloudfunctions.net",
|
|
14
|
+
"tenant":"tilechat"
|
|
23
15
|
},
|
|
24
16
|
"chat21Config": {
|
|
25
17
|
"appId": "tilechat",
|
|
26
|
-
"MQTTendpoint": "ws://
|
|
27
|
-
"APIendpoint": "/
|
|
18
|
+
"MQTTendpoint": "ws://99.80.197.164:15675/ws",
|
|
19
|
+
"APIendpoint": "http://99.80.197.164:8004/api"
|
|
28
20
|
},
|
|
29
|
-
"apiUrl": "/
|
|
30
|
-
"baseImageUrl": "/
|
|
31
|
-
"dashboardUrl": "/dashboard/",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
21
|
+
"apiUrl": "http://99.80.197.164:3000/",
|
|
22
|
+
"baseImageUrl": "http://99.80.197.164:3000/",
|
|
23
|
+
"dashboardUrl": "http://tiledesk-dashboard-pre.s3-eu-west-1.amazonaws.com/native-mqtt/dashboard/index.html",
|
|
24
|
+
"logLevel": "DEBUG",
|
|
25
|
+
"authPersistence": "NONE"
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"t2y12PruGU9wUtEGzBJfolMIgK": "CAR:T",
|
|
3
|
+
"chatEngine": "mqtt",
|
|
4
|
+
"uploadEngine": "native",
|
|
5
|
+
"pushEngine":"mqtt",
|
|
6
|
+
"fileUploadAccept":"*/*",
|
|
7
|
+
"logLevel": "DEBUG",
|
|
8
|
+
"remoteTranslationsUrl": "https://console.native.tiledesk.com/api/",
|
|
9
|
+
"firebaseConfig": {
|
|
10
|
+
"apiKey": "AIzaSyCoWXHNvP1-qOllCpTshhC6VjPXeRTK0T4",
|
|
11
|
+
"authDomain": "chat21-pre-01.firebaseapp.com",
|
|
12
|
+
"databaseURL": "https://chat21-pre-01.firebaseio.com",
|
|
13
|
+
"projectId": "chat21-pre-01",
|
|
14
|
+
"storageBucket": "chat21-pre-01.appspot.com",
|
|
15
|
+
"messagingSenderId": "269505353043",
|
|
16
|
+
"appId": "1:269505353043:web:b82af070572669e3707da6",
|
|
17
|
+
"chat21ApiUrl": "https://us-central1-chat21-pre-01.cloudfunctions.net",
|
|
18
|
+
"tenant":"tilechat"
|
|
19
|
+
},
|
|
20
|
+
"chat21Config": {
|
|
21
|
+
"appId": "tilechat",
|
|
22
|
+
"MQTTendpoint": "wss://console.native.tiledesk.com/mqws/ws",
|
|
23
|
+
"APIendpoint": "https://console.native.tiledesk.com/chatapi/api",
|
|
24
|
+
"_log": true
|
|
25
|
+
},
|
|
26
|
+
"apiUrl": "https://console.native.tiledesk.com/api/",
|
|
27
|
+
"baseImageUrl": "https://console.native.tiledesk.com/api/",
|
|
28
|
+
"authPersistence": "LOCAL",
|
|
29
|
+
"car":true
|
|
30
|
+
}
|