@chat21/chat21-ionic 3.0.97-rc.2 → 3.0.97-rc.3
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 +6 -0
- package/Dockerfile +1 -1
- package/package.json +1 -1
- package/src/app/app.component.ts +22 -13
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +2 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +9 -4
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +4 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +9 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +6 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +4 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +9 -1
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +1 -1
- package/src/app/pages/authentication/login/login.page.ts +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +24 -13
- package/src/assets/chat21-logo.png +0 -0
- package/src/assets/images/channel_icons/chat21.svg +3 -0
- package/src/assets/images/channel_icons/direct.svg +3 -0
- package/src/assets/images/channel_icons/email-logo.svg +9 -0
- package/src/assets/images/channel_icons/form-logo_v2.svg +13 -0
- package/src/assets/images/channel_icons/group.svg +3 -0
- package/src/assets/images/channel_icons/messenger-logo.svg +8 -0
- package/src/assets/images/channel_icons/telegram-logo.svg +7 -0
- package/src/assets/images/channel_icons/whatsapp-logo.svg +12 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/tiledesk-solo-logo.png +0 -0
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +1 -0
- package/src/chat21-core/providers/mqtt/mqtt-notifications.ts +2 -2
- package/src/chat21-core/utils/constants.ts +6 -0
- package/src/chat21-core/utils/utils.ts +4 -0
- package/src/assets/chat21-logo.svg +0 -78
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.97-rc.3
|
|
4
|
+
- added: channel property to message/conversation and changed attributes.channel to attributes.offline_channel for offline message email
|
|
5
|
+
- added: channel info in conversation-header-detail component
|
|
6
|
+
- updated: tiledesk logo
|
|
7
|
+
- bug-fixed: sort last-messages for mqtt before publish to component
|
|
8
|
+
|
|
3
9
|
### 3.0.97-rc.2
|
|
4
10
|
- added: do not send automatic offline email if conversation is of type 'email' or 'form'
|
|
5
11
|
- added: new tooltip directive
|
package/Dockerfile
CHANGED
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -769,18 +769,17 @@ export class AppComponent implements OnInit {
|
|
|
769
769
|
this.hadBeenCalledOpenModal = true;
|
|
770
770
|
}
|
|
771
771
|
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
;
|
|
772
|
+
if(this.IS_ON_MOBILE_DEVICE){
|
|
773
|
+
clearTimeout(this.timeModalLogin);
|
|
774
|
+
this.timeModalLogin = setTimeout(() => {
|
|
775
|
+
if (!this.hadBeenCalledOpenModal) {
|
|
776
|
+
this.authModal = this.presentModal('initAuthentication');
|
|
777
|
+
this.hadBeenCalledOpenModal = true;
|
|
778
|
+
}
|
|
779
|
+
}, 1000)
|
|
780
|
+
}else{
|
|
781
|
+
this.goToDashboardLogin()
|
|
782
|
+
}
|
|
784
783
|
}
|
|
785
784
|
}
|
|
786
785
|
|
|
@@ -1151,7 +1150,17 @@ export class AppComponent implements OnInit {
|
|
|
1151
1150
|
this.chatManager.goOffLine();
|
|
1152
1151
|
|
|
1153
1152
|
this.router.navigateByUrl('conversation-detail/'); //redirect to basePage
|
|
1154
|
-
this.
|
|
1153
|
+
if(this.IS_ON_MOBILE_DEVICE){
|
|
1154
|
+
clearTimeout(this.timeModalLogin);
|
|
1155
|
+
this.timeModalLogin = setTimeout(() => {
|
|
1156
|
+
if (!this.hadBeenCalledOpenModal) {
|
|
1157
|
+
this.authModal = this.presentModal('initAuthentication');
|
|
1158
|
+
this.hadBeenCalledOpenModal = true;
|
|
1159
|
+
}
|
|
1160
|
+
}, 1000)
|
|
1161
|
+
}else{
|
|
1162
|
+
this.goToDashboardLogin()
|
|
1163
|
+
}
|
|
1155
1164
|
|
|
1156
1165
|
|
|
1157
1166
|
// if (!this.hadBeenCalledOpenModal) {
|
|
@@ -110,10 +110,10 @@
|
|
|
110
110
|
|
|
111
111
|
<div class="bubble-container">
|
|
112
112
|
|
|
113
|
-
<div class="email-logo" *ngIf="message?.attributes?.
|
|
113
|
+
<div class="email-logo" *ngIf="message?.attributes?.offline_channel && message?.attributes?.offline_channel.includes(TYPE_MSG_EMAIL)">
|
|
114
114
|
<ion-icon name="mail"></ion-icon>
|
|
115
115
|
<ion-icon name="flash"
|
|
116
|
-
*ngIf="message?.attributes?.
|
|
116
|
+
*ngIf="message?.attributes?.offline_channel.includes('offline_')"
|
|
117
117
|
[ngStyle]="{'color': stylesMap.get('bubbleSentBackground')}">
|
|
118
118
|
</ion-icon>
|
|
119
119
|
</div>
|
|
@@ -96,17 +96,22 @@
|
|
|
96
96
|
<div class="conversation_project truncate">
|
|
97
97
|
<!-- DIRECT CONV -->
|
|
98
98
|
<div *ngIf="conversation.channel_type === TYPE_DIRECT">
|
|
99
|
-
<
|
|
99
|
+
<img class="channel-icon" src="/assets/images/channel_icons/direct.svg">
|
|
100
100
|
<span class="truncate">{{translationsMap.get('DIRECT_CHAT')}}</span>
|
|
101
101
|
</div>
|
|
102
102
|
<!-- GROUP CONV -->
|
|
103
103
|
<div *ngIf="conversation.uid.startsWith(TYPE_GROUP)">
|
|
104
|
-
<
|
|
105
|
-
<span
|
|
104
|
+
<img class="channel-icon" src="/assets/images/channel_icons/group.svg">
|
|
105
|
+
<span class="truncate">{{translationsMap.get('GROUP_CHAT')}}</span>
|
|
106
106
|
</div>
|
|
107
107
|
<!-- SUPPORT-GROUP CONV -->
|
|
108
108
|
<div *ngIf="conversation.uid.startsWith(TYPE_SUPPORT_GROUP) && !IS_ON_MOBILE_DEVICE">
|
|
109
|
-
<
|
|
109
|
+
<img class="channel-icon" src="assets/images/channel_icons/chat21.svg" *ngIf="conversation?.attributes && ( (conversation?.attributes?.channel && conversation?.attributes?.channel === CHANNEL_TYPE_CHAT21) || !conversation?.attributes?.channel) " >
|
|
110
|
+
<img class="channel-icon" src="assets/images/channel_icons/email-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.channel && conversation?.attributes?.channel === CHANNEL_TYPE_EMAIL" >
|
|
111
|
+
<img class="channel-icon" src="assets/images/channel_icons/form-logo_v2.svg" *ngIf="conversation?.attributes && conversation?.attributes?.channel && conversation?.attributes?.channel === CHANNEL_TYPE_FORM" >
|
|
112
|
+
<img class="channel-icon" src="assets/images/channel_icons/messenger-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.channel && conversation?.attributes?.channel === CHANNEL_TYPE_MESSANGER" >
|
|
113
|
+
<img class="channel-icon" src="assets/images/channel_icons/whatsapp-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.channel && conversation?.attributes?.channel === CHANNEL_TYPE_WHATSAPP" >
|
|
114
|
+
<img class="channel-icon" src="assets/images/channel_icons/telegram-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.channel && conversation?.attributes?.channel === CHANNEL_TYPE_TELEGRAM" >
|
|
110
115
|
<span *ngIf="conversation?.attributes?.project_name" class="truncate">{{conversation?.attributes?.project_name}}</span>
|
|
111
116
|
<span *ngIf="!conversation?.attributes?.project_name" class="truncate">{{conversation?.attributes?.projectId}}</span>
|
|
112
117
|
</div>
|
|
@@ -99,6 +99,10 @@ ion-item {
|
|
|
99
99
|
span{
|
|
100
100
|
padding-left: 5px
|
|
101
101
|
}
|
|
102
|
+
.channel-icon{
|
|
103
|
+
vertical-align: sub;
|
|
104
|
+
filter: brightness(0) saturate(100%) invert(83%) sepia(45%) saturate(1879%) hue-rotate(178deg) brightness(79%) contrast(81%);
|
|
105
|
+
}
|
|
102
106
|
}
|
|
103
107
|
.conversation_with {
|
|
104
108
|
color: rgba(0, 0, 0, 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TYPE_GROUP, TYPE_SUPPORT_GROUP } from './../../../../chat21-core/utils/constants';
|
|
1
|
+
import { CHANNEL_TYPE_CHAT21, CHANNEL_TYPE_EMAIL, CHANNEL_TYPE_FORM, CHANNEL_TYPE_MESSANGER, CHANNEL_TYPE_TELEGRAM, CHANNEL_TYPE_WHATSAPP, TYPE_GROUP, TYPE_SUPPORT_GROUP } from './../../../../chat21-core/utils/constants';
|
|
2
2
|
import { TYPE_DIRECT } from 'src/chat21-core/utils/constants';
|
|
3
3
|
import { Component, EventEmitter, Input, IterableDiffers, KeyValueDiffers, OnInit, Output, SimpleChange } from '@angular/core';
|
|
4
4
|
import { ConversationModel } from 'src/chat21-core/models/conversation';
|
|
@@ -53,6 +53,14 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
53
53
|
TYPE_GROUP = TYPE_GROUP;
|
|
54
54
|
TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP;
|
|
55
55
|
|
|
56
|
+
//ATTRIBUTES CHANNEL
|
|
57
|
+
CHANNEL_TYPE_CHAT21 = CHANNEL_TYPE_CHAT21;
|
|
58
|
+
CHANNEL_TYPE_EMAIL = CHANNEL_TYPE_EMAIL;
|
|
59
|
+
CHANNEL_TYPE_FORM = CHANNEL_TYPE_FORM;
|
|
60
|
+
CHANNEL_TYPE_MESSANGER = CHANNEL_TYPE_MESSANGER;
|
|
61
|
+
CHANNEL_TYPE_WHATSAPP = CHANNEL_TYPE_WHATSAPP;
|
|
62
|
+
CHANNEL_TYPE_TELEGRAM = CHANNEL_TYPE_TELEGRAM;
|
|
63
|
+
|
|
56
64
|
IS_ON_MOBILE_DEVICE: boolean
|
|
57
65
|
/**
|
|
58
66
|
*
|
|
@@ -44,7 +44,12 @@
|
|
|
44
44
|
</div>
|
|
45
45
|
<!-- SUPPORT-GROUP CONV -->
|
|
46
46
|
<div *ngIf="conversationUid?.startsWith(TYPE_SUPPORT_GROUP) && !IS_ON_MOBILE_DEVICE">
|
|
47
|
-
<
|
|
47
|
+
<img class="channel-icon" src="assets/images/channel_icons/chat21.svg" *ngIf="( (conversationAvatar?.channel && conversationAvatar?.channel === CHANNEL_TYPE_CHAT21) || !conversationAvatar?.channel) " >
|
|
48
|
+
<img class="channel-icon" src="assets/images/channel_icons/email-logo.svg" *ngIf="conversationAvatar?.channel && conversationAvatar?.channel === CHANNEL_TYPE_EMAIL" >
|
|
49
|
+
<img class="channel-icon" src="assets/images/channel_icons/form-logo_v2.svg" *ngIf="conversationAvatar?.channel && conversationAvatar?.channel === CHANNEL_TYPE_FORM" >
|
|
50
|
+
<img class="channel-icon" src="assets/images/channel_icons/messenger-logo.svg" *ngIf="conversationAvatar?.channel && conversationAvatar?.channel === CHANNEL_TYPE_MESSANGER" >
|
|
51
|
+
<img class="channel-icon" src="assets/images/channel_icons/whatsapp-logo.svg" *ngIf="conversationAvatar?.channel && conversationAvatar?.channel === CHANNEL_TYPE_WHATSAPP" >
|
|
52
|
+
<img class="channel-icon" src="assets/images/channel_icons/telegram-logo.svg" *ngIf="conversationAvatar?.channel && conversationAvatar?.channel === CHANNEL_TYPE_TELEGRAM" >
|
|
48
53
|
<span *ngIf="conversationAvatar?.project_name" class="truncate">{{conversationAvatar?.project_name}}</span>
|
|
49
54
|
<span *ngIf="!conversationAvatar?.project_name" class="truncate">{{conversationAvatar?.projectId}}</span>
|
|
50
55
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TYPE_GROUP } from './../../../../chat21-core/utils/constants';
|
|
1
|
+
import { CHANNEL_TYPE_CHAT21, CHANNEL_TYPE_EMAIL, CHANNEL_TYPE_FORM, CHANNEL_TYPE_MESSANGER, CHANNEL_TYPE_TELEGRAM, CHANNEL_TYPE_WHATSAPP, TYPE_GROUP } from './../../../../chat21-core/utils/constants';
|
|
2
2
|
import {
|
|
3
3
|
Component,
|
|
4
4
|
OnInit,
|
|
@@ -51,6 +51,14 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
51
51
|
TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP
|
|
52
52
|
TYPE_GROUP = TYPE_GROUP
|
|
53
53
|
|
|
54
|
+
//ATTRIBUTES CHANNEL
|
|
55
|
+
CHANNEL_TYPE_CHAT21 = CHANNEL_TYPE_CHAT21;
|
|
56
|
+
CHANNEL_TYPE_EMAIL = CHANNEL_TYPE_EMAIL;
|
|
57
|
+
CHANNEL_TYPE_FORM = CHANNEL_TYPE_FORM;
|
|
58
|
+
CHANNEL_TYPE_MESSANGER = CHANNEL_TYPE_MESSANGER;
|
|
59
|
+
CHANNEL_TYPE_WHATSAPP = CHANNEL_TYPE_WHATSAPP;
|
|
60
|
+
CHANNEL_TYPE_TELEGRAM = CHANNEL_TYPE_TELEGRAM;
|
|
61
|
+
|
|
54
62
|
constructor(
|
|
55
63
|
public imageRepoService: ImageRepoService,
|
|
56
64
|
private route: ActivatedRoute,
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -402,7 +402,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
402
402
|
if (form && form.text && form.text.trim() !== '') {
|
|
403
403
|
const text = '**' + form.subject + '**\r\n' + form.text
|
|
404
404
|
const attributes = {
|
|
405
|
-
|
|
405
|
+
offline_channel: TYPE_MSG_EMAIL
|
|
406
406
|
}
|
|
407
407
|
this.eventSendMessage.emit({ msg: text, type: TYPE_MSG_TEXT, metadata: null, attributes: attributes });
|
|
408
408
|
}
|
|
@@ -60,7 +60,7 @@ export class LoginPage implements OnInit {
|
|
|
60
60
|
|
|
61
61
|
/** */
|
|
62
62
|
initialize() {
|
|
63
|
-
this.companyLogoBlackUrl = 'assets/chat21-logo.
|
|
63
|
+
this.companyLogoBlackUrl = 'assets/chat21-logo.png';
|
|
64
64
|
this.companyName = 'Tiledesk'; // this.chatManager.getTenant();
|
|
65
65
|
this.translations();
|
|
66
66
|
this.events.subscribe('sign-in', this.signIn);
|
|
@@ -337,7 +337,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
337
337
|
conv.channel_type,
|
|
338
338
|
null,
|
|
339
339
|
conv.attributes['projectId'],
|
|
340
|
-
conv.attributes['project_name'])
|
|
340
|
+
conv.attributes['project_name']),
|
|
341
|
+
conv.attributes['channel']
|
|
341
342
|
}
|
|
342
343
|
|
|
343
344
|
}
|
|
@@ -783,7 +784,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
783
784
|
private setAttributes(): any {
|
|
784
785
|
const attributes: any = {
|
|
785
786
|
client: navigator.userAgent,
|
|
786
|
-
sourcePage: location.href
|
|
787
|
+
sourcePage: location.href
|
|
787
788
|
}
|
|
788
789
|
|
|
789
790
|
//TODO: servono ???
|
|
@@ -846,7 +847,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
846
847
|
conv.channel_type,
|
|
847
848
|
null,
|
|
848
849
|
conv.attributes['projectId'],
|
|
849
|
-
conv.attributes['project_name']
|
|
850
|
+
conv.attributes['project_name'],
|
|
851
|
+
conv.attributes['channel']
|
|
850
852
|
)
|
|
851
853
|
|
|
852
854
|
}
|
|
@@ -863,7 +865,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
863
865
|
conv.channel_type,
|
|
864
866
|
null,
|
|
865
867
|
conv.attributes['projectId'],
|
|
866
|
-
conv.attributes['project_name']
|
|
868
|
+
conv.attributes['project_name'],
|
|
869
|
+
conv.attributes['channel']
|
|
867
870
|
)
|
|
868
871
|
let duration = getDateDifference(conv.timestamp, Date.now())
|
|
869
872
|
duration.days > 10 && conv.channel_type !== TYPE_DIRECT? this.disableTextarea = true: this.disableTextarea = false
|
|
@@ -884,7 +887,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
884
887
|
conv.channel_type,
|
|
885
888
|
null,
|
|
886
889
|
conv.attributes['projectId'],
|
|
887
|
-
conv.attributes['project_name']
|
|
890
|
+
conv.attributes['project_name'],
|
|
891
|
+
conv.attributes['channel']
|
|
888
892
|
)
|
|
889
893
|
let duration = getDateDifference(conv.timestamp, Date.now())
|
|
890
894
|
duration.days > 10 && conv.channel_type !== TYPE_DIRECT? this.disableTextarea = true: this.disableTextarea = false
|
|
@@ -899,7 +903,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
899
903
|
conv.channel_type,
|
|
900
904
|
null,
|
|
901
905
|
conv.attributes['projectId'],
|
|
902
|
-
conv.attributes['project_name']
|
|
906
|
+
conv.attributes['project_name'],
|
|
907
|
+
conv.attributes['channel']
|
|
903
908
|
)
|
|
904
909
|
}
|
|
905
910
|
this.logger.log('[CONVS-DETAIL] - setHeaderContent > conversationAvatar: ', this.conversationAvatar)
|
|
@@ -1054,12 +1059,15 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1054
1059
|
msg = `[${metadata.name}](${metadata.src})`
|
|
1055
1060
|
}
|
|
1056
1061
|
}
|
|
1057
|
-
|
|
1062
|
+
this.conversation.attributes && this.conversation.attributes['channel']? attributes.channel = this.conversation.attributes['channel']: null;
|
|
1058
1063
|
metadata ? (metadata = metadata) : (metadata = '')
|
|
1059
|
-
|
|
1060
|
-
const channelIsNotEmailOrForm = (attributes && attributes['channel'] && (attributes['channel'].name===TYPE_MSG_EMAIL || attributes['channel'].name===TYPE_MSG_FORM))
|
|
1064
|
+
this.logger.log('[CONVS-DETAIL] attributes--->>>> 1111',this.conversation.attributes, attributes)
|
|
1061
1065
|
this.logger.log('[CONVS-DETAIL] - SEND MESSAGE msg: ', msg, ' - messages: ', this.messages, ' - loggedUser: ', this.loggedUser)
|
|
1062
|
-
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
const emailSectionMsg = (attributes && attributes['offline_channel']===TYPE_MSG_EMAIL)
|
|
1069
|
+
const channelIsNotEmailOrForm = (attributes && attributes['channel'] && (attributes['channel'] === TYPE_MSG_EMAIL || attributes['channel']===TYPE_MSG_FORM))
|
|
1070
|
+
|
|
1063
1071
|
if ((msg && msg.trim() !== '') || type !== TYPE_MSG_TEXT) {
|
|
1064
1072
|
|
|
1065
1073
|
|
|
@@ -1071,7 +1079,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1071
1079
|
this.sendEmail(msgText).subscribe(status => {
|
|
1072
1080
|
if(status){
|
|
1073
1081
|
//SEND MESSAGE ALSO AS EMAIL
|
|
1074
|
-
attributes['
|
|
1082
|
+
attributes['offline_channel']= 'offline_'+TYPE_MSG_EMAIL
|
|
1075
1083
|
}
|
|
1076
1084
|
|
|
1077
1085
|
this.conversationHandlerService.sendMessage(
|
|
@@ -1105,6 +1113,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1105
1113
|
}
|
|
1106
1114
|
|
|
1107
1115
|
|
|
1116
|
+
|
|
1108
1117
|
// ----------------------------------------------------------
|
|
1109
1118
|
// InitSubscriptions BS subscriptions
|
|
1110
1119
|
// ----------------------------------------------------------
|
|
@@ -1248,7 +1257,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1248
1257
|
this.channelType,
|
|
1249
1258
|
null,
|
|
1250
1259
|
this.conversation.attributes['projectId'],
|
|
1251
|
-
this.conversation.attributes['project_name']
|
|
1260
|
+
this.conversation.attributes['project_name'],
|
|
1261
|
+
this.conversation.attributes['channel']
|
|
1252
1262
|
)
|
|
1253
1263
|
}
|
|
1254
1264
|
if (msg.attributes && msg.attributes.hasOwnProperty("updateUserEmail")) {
|
|
@@ -1260,7 +1270,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1260
1270
|
this.channelType,
|
|
1261
1271
|
userEmail,
|
|
1262
1272
|
this.conversation.attributes['projectId'],
|
|
1263
|
-
this.conversation.attributes['project_name']
|
|
1273
|
+
this.conversation.attributes['project_name'],
|
|
1274
|
+
this.conversation.attributes['channel']
|
|
1264
1275
|
)
|
|
1265
1276
|
this.getLeadDetail()
|
|
1266
1277
|
}
|
|
Binary file
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" data-v-78d18411="" width="15" height="15" fill="none" viewBox="0 0 24 24" class="inbox-icon">
|
|
2
|
+
<path d="M22.002 12C22.002 6.477 17.524 2 12 2 6.476 1.999 2 6.477 2 12.001c0 5.186 3.947 9.45 9.001 9.952V20.11c-.778-.612-1.478-1.905-1.939-3.61h1.94V15H8.737a18.969 18.969 0 0 1-.135-5h6.794c.068.64.105 1.31.105 2h1.5c0-.684-.033-1.353-.095-2h3.358c.154.64.237 1.31.237 2h1.5ZM4.786 16.5h2.722l.102.396c.317 1.17.748 2.195 1.27 3.015a8.532 8.532 0 0 1-4.094-3.41ZM3.736 10h3.358a20.847 20.847 0 0 0-.095 2c0 1.043.075 2.051.217 3H4.043a8.483 8.483 0 0 1-.544-3c0-.682.08-1.347.232-1.983L3.736 10Zm5.122-5.902.023-.008C8.16 5.222 7.611 6.748 7.298 8.5H4.25c.905-2 2.56-3.587 4.608-4.402Zm3.026-.594L12 3.5l.126.006c1.262.126 2.48 2.125 3.045 4.995H8.83c.568-2.878 1.79-4.88 3.055-4.996Zm3.343.76-.107-.174.291.121a8.533 8.533 0 0 1 4.339 4.29h-3.048c-.298-1.665-.806-3.125-1.475-4.237Z M12 19a1 1 0 0 0 1 1h3v2h-.5a.5.5 0 1 0 0 1h4a.5.5 0 0 0 0-1H19v-2h3a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1h-9a1 1 0 0 0-1 1v5Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg focusable="false"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" height="15" width="15" viewBox="0 0 512 512"
|
|
3
|
+
style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
|
4
|
+
<path fill="#2C3E48" d="M502.3,190.8c3.9-3.1,9.7-0.2,9.7,4.7V400c0,26.5-21.5,48-48,48H48c-26.5,0-48-21.5-48-48V195.6
|
|
5
|
+
c0-5,5.7-7.8,9.7-4.7c22.4,17.4,52.1,39.5,154.1,113.6c21.1,15.4,56.7,47.8,92.2,47.6c35.7,0.3,72-32.8,92.3-47.6
|
|
6
|
+
C450.3,230.4,479.9,208.2,502.3,190.8z M256,320c23.2,0.4,56.6-29.2,73.4-41.4c132.7-96.3,142.8-104.7,173.4-128.7
|
|
7
|
+
c5.8-4.5,9.2-11.5,9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5,64,0,85.5,0,112v19c0,7.4,3.4,14.3,9.2,18.9
|
|
8
|
+
c30.6,23.9,40.7,32.4,173.4,128.7C199.4,290.8,232.8,320.4,256,320L256,320z"/>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg focusable="false"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 448 512" height="15" width="15"
|
|
3
|
+
style="enable-background:new 0 0 448 512;" xml:space="preserve">
|
|
4
|
+
<path fill="#779bbb" d="M450,432V80c0-26.5-21.5-48-48-48H50C23.5,32,2,53.5,2,80v352c0,26.5,21.5,48,48,48h352
|
|
5
|
+
C428.5,480,450,458.5,450,432z M114,192c-8.8,0-16-7.2-16-16v-32c0-8.8,7.2-16,16-16h226c8.8,0,16,7.2,16,16l1,32
|
|
6
|
+
c0,8.8-8.2,16-17,16H114z M114,288c-8.8,0-16-7.2-16-16v-32c0-8.8,7.2-16,16-16h155c8.8,0,16,7.2,16,16v32c0,8.8-7.2,16-16,16H114z
|
|
7
|
+
M114,384c-8.8,0-16-7.2-16-16v-32c0-8.8,7.2-16,16-16h111c8.8,0,16,7.2,16,16v32c0,8.8-7.2,16-16,16H114z"/>
|
|
8
|
+
<g>
|
|
9
|
+
<polygon fill="#779bbb" points="405.1,237.6 365,204.1 262.4,336.1 262.3,378.6 302.4,369.6 "/>
|
|
10
|
+
<path fill="#779bbb" d="M427.8,197L398,172.1c-2.8-2.4-7-1.9-9.2,1L371.8,195l40.1,33.5l17.1-21.9C431.1,203.7,430.7,199.4,427.8,197z
|
|
11
|
+
"/>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="15" width="15" viewBox="0 0 24 24" fill="#000000">
|
|
2
|
+
<path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg focusable="false" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" height="15" width="15" viewBox="0 0 512 512"
|
|
2
|
+
style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
|
3
|
+
<path fill="#2C3E48" d="M256.5,8C116.5,8,8,110.3,8,248.6c0,72.3,29.7,134.8,78.1,177.9c8.3,7.5,6.6,11.9,8.1,58.2
|
|
4
|
+
c0.4,11,9.6,19.6,20.6,19.2c2.5-0.1,5-0.6,7.3-1.7c52.9-23.3,53.6-25.1,62.6-22.7c153.3,42.2,319.4-55.9,319.4-231
|
|
5
|
+
C504,110.3,396.6,8,256.5,8z M405.8,193.1l-73,115.6c-11.1,17.4-34.1,22.6-51.6,11.5c-0.8-0.5-1.6-1-2.3-1.6l-58.1-43.5
|
|
6
|
+
c-5.3-4-12.7-4-18,0l-78.4,59.4c-10.5,7.9-24.2-4.6-17.1-15.7l73-115.6c11-17.4,34.1-22.6,51.6-11.6c0.8,0.5,1.6,1.1,2.4,1.6
|
|
7
|
+
l58.1,43.5c5.3,4,12.7,4,18,0l78.4-59.4C399.1,169.5,412.8,182,405.8,193.1L405.8,193.1z"/>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg focusable="false"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 448 512" height="15" width="15"
|
|
3
|
+
style="enable-background:new 0 0 448 512;" xml:space="preserve">
|
|
4
|
+
<path fill="#2C3E48" d="M446.7,98.6l-67.6,318.8c-5.1,22.5-18.4,28.1-37.3,17.5l-103-75.9l-49.7,47.8c-5.5,5.5-10.1,10.1-20.7,10.1
|
|
5
|
+
l7.4-104.9l190.9-172.5c8.3-7.4-1.8-11.5-12.9-4.1L117.8,284L16.2,252.2c-22.1-6.9-22.5-22.1,4.6-32.7L418.2,66.4
|
|
6
|
+
C436.6,59.5,452.7,70.5,446.7,98.6z"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg focusable="false"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 448 512" height="15" width="15"
|
|
3
|
+
style="enable-background:new 0 0 448 512;" xml:space="preserve">
|
|
4
|
+
<path fill="2C3E48" d="M380.9,97.1C339,55.1,283.2,32,223.9,32c-122.4,0-222,99.6-222,222c0,39.1,10.2,77.3,29.6,111L0,480l117.7-30.9
|
|
5
|
+
c32.4,17.7,68.9,27,106.1,27h0.1c122.3,0,224.1-99.6,224.1-222C448,194.8,422.8,139.1,380.9,97.1z M223.9,438.7
|
|
6
|
+
c-33.2,0-65.7-8.9-94-25.7l-6.7-4l-69.8,18.3L72,359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2c0-101.7,82.8-184.5,184.6-184.5
|
|
7
|
+
c49.3,0,95.6,19.2,130.4,54.1s56.2,81.2,56.1,130.5C410.5,355.9,325.6,438.7,223.9,438.7z M325.1,300.5c-5.5-2.8-32.8-16.2-37.9-18
|
|
8
|
+
c-5.1-1.9-8.8-2.8-12.5,2.8c-3.7,5.6-14.3,18-17.6,21.8c-3.2,3.7-6.5,4.2-12,1.4c-32.6-16.3-54-29.1-75.5-66
|
|
9
|
+
c-5.7-9.8,5.7-9.1,16.3-30.3c1.8-3.7,0.9-6.9-0.5-9.7s-12.5-30.1-17.1-41.2c-4.5-10.8-9.1-9.3-12.5-9.5c-3.2-0.2-6.9-0.2-10.6-0.2
|
|
10
|
+
c-3.7,0-9.7,1.4-14.8,6.9c-5.1,5.6-19.4,19-19.4,46.3s19.9,53.7,22.6,57.4c2.8,3.7,39.1,59.7,94.8,83.8c35.2,15.2,49,16.5,66.6,13.9
|
|
11
|
+
c10.7-1.6,32.8-13.4,37.4-26.4s4.6-24.1,3.2-26.4C334.3,304.6,330.6,303.2,325.1,300.5z"/>
|
|
12
|
+
</svg>
|
package/src/assets/logo.png
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -98,6 +98,7 @@ export class MQTTConversationHandler extends ConversationHandlerService {
|
|
|
98
98
|
}
|
|
99
99
|
this.chat21Service.chatClient.lastMessages(this.conversationWith, (err, messages) => {
|
|
100
100
|
if (!err) {
|
|
101
|
+
messages.sort(compareValues('timestamp', 'asc'));
|
|
101
102
|
messages.forEach(message => {
|
|
102
103
|
const msg: MessageModel = message;
|
|
103
104
|
msg.uid = message.message_id;
|
|
@@ -36,10 +36,10 @@ export class MQTTNotifications extends NotificationsService {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
getNotificationPermissionAndSaveToken(currentUserUid) {
|
|
39
|
-
|
|
39
|
+
this.logger.log("[MQTTNotificationService] getNotificationPermissionAndSaveToken()",currentUserUid );
|
|
40
40
|
this.userId = currentUserUid;
|
|
41
41
|
if (firebase.messaging.isSupported()) {
|
|
42
|
-
|
|
42
|
+
this.logger.log("[MQTTNotificationService] firebase.messaging.isSupported -> YES");
|
|
43
43
|
const messaging = firebase.messaging();
|
|
44
44
|
// messaging.requestPermission()
|
|
45
45
|
Notification.requestPermission().then((permission) => {
|
|
@@ -39,6 +39,12 @@ export const BCK_COLOR_CONVERSATION_UNSELECTED = '#FFFFFF ';
|
|
|
39
39
|
|
|
40
40
|
export const TYPE_SUPPORT_GROUP = 'support-group';
|
|
41
41
|
export const CHANNEL_TYPE_GROUP = 'group';
|
|
42
|
+
export const CHANNEL_TYPE_CHAT21 = 'chat21';
|
|
43
|
+
export const CHANNEL_TYPE_EMAIL = 'email';
|
|
44
|
+
export const CHANNEL_TYPE_FORM = 'form';
|
|
45
|
+
export const CHANNEL_TYPE_MESSANGER = 'messanger';
|
|
46
|
+
export const CHANNEL_TYPE_WHATSAPP = 'whatsapp';
|
|
47
|
+
export const CHANNEL_TYPE_TELEGRAM = 'telegram';
|
|
42
48
|
|
|
43
49
|
// TYPES MESSAGES
|
|
44
50
|
export const TYPE_MSG_TEXT = 'text';
|
|
@@ -573,11 +573,14 @@ export function setConversationAvatar(
|
|
|
573
573
|
conversationWithEmail?: string,
|
|
574
574
|
projectId?: string,
|
|
575
575
|
project_name?: string,
|
|
576
|
+
channel?: string,
|
|
576
577
|
width?: string,
|
|
577
578
|
height?: string,
|
|
578
579
|
): any {
|
|
579
580
|
const conversationWidth = (width) ? width : '40px';
|
|
580
581
|
const conversationHeight = (height) ? height : '40px';
|
|
582
|
+
const conversationChannel = (channel) ? channel : 'chat21';
|
|
583
|
+
|
|
581
584
|
const conversationAvatar = {
|
|
582
585
|
uid: conversationWith,
|
|
583
586
|
conversation_with: conversationWith,
|
|
@@ -588,6 +591,7 @@ export function setConversationAvatar(
|
|
|
588
591
|
color: getColorBck(conversationWithFullname),
|
|
589
592
|
projectId: projectId,
|
|
590
593
|
project_name: project_name,
|
|
594
|
+
channel: conversationChannel,
|
|
591
595
|
width: conversationWidth,
|
|
592
596
|
height: conversationHeight
|
|
593
597
|
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<svg
|
|
3
|
-
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
-
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
-
id="svg30"
|
|
9
|
-
version="1.1"
|
|
10
|
-
viewBox="0 0 412 132">
|
|
11
|
-
<metadata
|
|
12
|
-
id="metadata34">
|
|
13
|
-
<rdf:RDF>
|
|
14
|
-
<cc:Work
|
|
15
|
-
rdf:about="">
|
|
16
|
-
<dc:format>image/svg+xml</dc:format>
|
|
17
|
-
<dc:type
|
|
18
|
-
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
19
|
-
</cc:Work>
|
|
20
|
-
</rdf:RDF>
|
|
21
|
-
</metadata>
|
|
22
|
-
<defs
|
|
23
|
-
id="defs4">
|
|
24
|
-
<style
|
|
25
|
-
id="style2">.cls-1{fill:#3c3c3b;}.cls-2{fill:#ef806e;}.cls-3{fill:none;}</style>
|
|
26
|
-
</defs>
|
|
27
|
-
<title
|
|
28
|
-
id="title6">tiledesk-logo</title>
|
|
29
|
-
<g
|
|
30
|
-
data-name="Livello 2"
|
|
31
|
-
id="Livello_2">
|
|
32
|
-
<g
|
|
33
|
-
data-name="Livello 1"
|
|
34
|
-
id="Livello_1-2">
|
|
35
|
-
<path
|
|
36
|
-
id="path8"
|
|
37
|
-
d="M88.09,58.83h11V41.69h7V58.83h10.93v6.52H106.14v37.59h-7V65.35h-11Z"
|
|
38
|
-
class="cls-1" />
|
|
39
|
-
<path
|
|
40
|
-
id="path10"
|
|
41
|
-
d="M135,46.75a4.45,4.45,0,1,1-1.3-3.16A4.3,4.3,0,0,1,135,46.75Zm-7.92,56.19V58.83h7v44.11Z"
|
|
42
|
-
class="cls-1" />
|
|
43
|
-
<path
|
|
44
|
-
id="path12"
|
|
45
|
-
d="M149.54,102.94V27.75h7v75.19Z"
|
|
46
|
-
class="cls-1" />
|
|
47
|
-
<path
|
|
48
|
-
id="path14"
|
|
49
|
-
d="M214.71,83.59h-38.8a15,15,0,0,0,5.51,9.32,15.94,15.94,0,0,0,17.49,2A16.22,16.22,0,0,0,204.68,90h8a22.46,22.46,0,0,1-8.47,10,21,21,0,0,1-11.53,3.66,25.12,25.12,0,0,1-10-1.8,23.88,23.88,0,0,1-7.32-4.91,21.92,21.92,0,0,1-6.77-16.24,23.1,23.1,0,0,1,23.06-23.06,22.57,22.57,0,0,1,16.09,6.52,21,21,0,0,1,7,15.74ZM201.62,68.26a15.18,15.18,0,0,0-10-3.61q-8.57,0-13.53,7.77A15.58,15.58,0,0,0,176,77.58h31.28A16.21,16.21,0,0,0,201.62,68.26Z"
|
|
50
|
-
class="cls-1" />
|
|
51
|
-
<path
|
|
52
|
-
id="path16"
|
|
53
|
-
d="M261.32,102.94V95.41q-.59.77-1.25,1.52a20.38,20.38,0,0,1-30.78,0,24.24,24.24,0,0,1,0-32.08,20.38,20.38,0,0,1,30.78,0q.66.74,1.25,1.52V27.75h7v75.19Zm-4.46-33.28a15.16,15.16,0,0,0-22.16,0,16.36,16.36,0,0,0,0,22.46,15.16,15.16,0,0,0,22.16,0,16.36,16.36,0,0,0,0-22.46Z"
|
|
54
|
-
class="cls-1" />
|
|
55
|
-
<path
|
|
56
|
-
id="path18"
|
|
57
|
-
d="M326.49,83.59h-38.8a15,15,0,0,0,5.51,9.32,15.94,15.94,0,0,0,17.49,2A16.22,16.22,0,0,0,316.46,90h8A22.46,22.46,0,0,1,316,100a21,21,0,0,1-11.53,3.66,25.12,25.12,0,0,1-10-1.8,23.88,23.88,0,0,1-7.32-4.91,21.92,21.92,0,0,1-6.77-16.24,23.1,23.1,0,0,1,23.06-23.06,22.57,22.57,0,0,1,16.09,6.52,21,21,0,0,1,7,15.74ZM313.4,68.26a15.18,15.18,0,0,0-10-3.61q-8.58,0-13.53,7.77a15.58,15.58,0,0,0-2.11,5.16h31.28A16.21,16.21,0,0,0,313.4,68.26Z"
|
|
58
|
-
class="cls-1" />
|
|
59
|
-
<path
|
|
60
|
-
id="path20"
|
|
61
|
-
d="M351.22,98.43q9.63,0,9.63-7.2,0-4.2-6.9-6.44-2.91-1-6.26-1.77a34,34,0,0,1-6.3-2.16,12.35,12.35,0,0,1-5.11-4,9.67,9.67,0,0,1-1.7-5.7q0-6.57,4.62-10a18.18,18.18,0,0,1,11-3.39,20,20,0,0,1,10.66,2.64q4.23,2.6,5.64,9.29H359q-1.12-3.69-3.42-4.9A11.72,11.72,0,0,0,350,63.64a10.66,10.66,0,0,0-5.63,1.42,4.8,4.8,0,0,0-2.4,4.42,5,5,0,0,0,2,4.36,17.61,17.61,0,0,0,4.87,2.28q2.91.91,6.26,1.66A29.59,29.59,0,0,1,361.46,80q6.81,3.25,6.81,10.37t-5.1,10.52a19.46,19.46,0,0,1-5.67,2.55,25.09,25.09,0,0,1-6.67.85q-15.34,0-17.62-13.63h7.42q1.12,4.29,3.78,6A12,12,0,0,0,351.22,98.43Z"
|
|
62
|
-
class="cls-1" />
|
|
63
|
-
<path
|
|
64
|
-
id="path22"
|
|
65
|
-
d="M378.32,102.94V27.75h7V78.58l16.14-19.85h9.32L392.65,80.19,412,102.94h-9.32L385.33,81.78v21.17Z"
|
|
66
|
-
class="cls-1" />
|
|
67
|
-
<polygon
|
|
68
|
-
id="polygon24"
|
|
69
|
-
points="38.24 27.75 0 27.75 0 104.25 76.49 104.25 76.49 66 38.24 66 38.24 27.75"
|
|
70
|
-
class="cls-2" />
|
|
71
|
-
<rect
|
|
72
|
-
id="rect26"
|
|
73
|
-
height="132"
|
|
74
|
-
width="412"
|
|
75
|
-
class="cls-3" />
|
|
76
|
-
</g>
|
|
77
|
-
</g>
|
|
78
|
-
</svg>
|