@chat21/chat21-ionic 3.0.68-rc.2 → 3.0.69-rc1
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 +8 -0
- package/package.json +1 -1
- package/src/app/app.component.ts +3 -0
- package/src/app/components/conversation-info/info-content/info-content.component.ts +19 -19
- package/src/app/components/project-item/project-item.component.ts +6 -5
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +22 -22
- package/src/app/pages/conversations-list/conversations-list.page.ts +19 -19
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +19 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.69-rc1
|
|
4
|
+
- changed: restored lookup behaviour for old conversations with 3 segment and without project id inside it
|
|
5
|
+
|
|
6
|
+
### 3.0.68 in PROD
|
|
7
|
+
|
|
8
|
+
### 3.0.68-rc3
|
|
9
|
+
- bug-fixed: not sound with unservedRequest if WebSocket restart again (every 3/5min)
|
|
10
|
+
|
|
3
11
|
### 3.0.68-rc2
|
|
4
12
|
- bug-fixed: removed lookup API call for old requests
|
|
5
13
|
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -863,6 +863,7 @@ export class AppComponent implements OnInit {
|
|
|
863
863
|
if(sound_status && sound_status !== 'undefined'){
|
|
864
864
|
this.isSoundEnabled = sound_status === 'enabled'? true: false
|
|
865
865
|
}
|
|
866
|
+
// this.logger.debug('[APP-COMP] manageTabNotification can saund?', this.isInitialized, this.isSoundEnabled)
|
|
866
867
|
if(this.isInitialized && this.isSoundEnabled) this.soundMessage()
|
|
867
868
|
}
|
|
868
869
|
|
|
@@ -1138,6 +1139,8 @@ export class AppComponent implements OnInit {
|
|
|
1138
1139
|
// that.presentToast();
|
|
1139
1140
|
}
|
|
1140
1141
|
});
|
|
1142
|
+
} else {
|
|
1143
|
+
this.removePresenceAndLogout()
|
|
1141
1144
|
}
|
|
1142
1145
|
}
|
|
1143
1146
|
}
|
|
@@ -100,12 +100,12 @@ export class InfoContentComponent implements OnInit {
|
|
|
100
100
|
this.logger.log('[INFO-CONTENT-COMP] - paramMap.subscribe conversationWith_segments: ', conversationWith_segments);
|
|
101
101
|
|
|
102
102
|
if (this.conversationWith.startsWith("support-group")) {
|
|
103
|
-
|
|
103
|
+
if (conversationWith_segments.length === 4) {
|
|
104
104
|
this.project_id = conversationWith_segments[2];
|
|
105
105
|
this.selectInfoContentTypeInfoSupportGroup();
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
} else {
|
|
107
|
+
this.getProjectIdByConversationWith(this.conversationWith)
|
|
108
|
+
}
|
|
109
109
|
} else {
|
|
110
110
|
this.selectInfoContentTypeDirectAndGroup(this.conversationWith);
|
|
111
111
|
}
|
|
@@ -115,25 +115,25 @@ export class InfoContentComponent implements OnInit {
|
|
|
115
115
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
getProjectIdByConversationWith(conversationWith: string) {
|
|
119
|
+
const tiledeskToken = this.tiledeskAuthService.getTiledeskToken();
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
this.tiledeskService.getProjectIdByConvRecipient(tiledeskToken, conversationWith).subscribe(res => {
|
|
122
|
+
this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT RES', res);
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
if (res) {
|
|
125
|
+
this.project_id = res.id_project
|
|
126
|
+
this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT this.project_id', this.project_id);
|
|
127
|
+
}
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
}, (error) => {
|
|
130
|
+
this.logger.error('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT - ERROR ', error);
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
}, () => {
|
|
133
|
+
this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT * COMPLETE *');
|
|
134
|
+
this.selectInfoContentTypeInfoSupportGroup();
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
137
|
|
|
138
138
|
ngOnInit() {
|
|
139
139
|
this.logger.log('>>> N INFO-CONTENT-COMP CALLING ngOnInit');
|
|
@@ -278,11 +278,9 @@ export class ProjectItemComponent implements OnInit {
|
|
|
278
278
|
available = !available
|
|
279
279
|
this.logger.log('[PROJECT-ITEM] - changeAvailabilityState projectid', projectid, ' available: ', available);
|
|
280
280
|
|
|
281
|
-
this.wsService.updateCurrentUserAvailability(this.tiledeskToken, projectid, available)
|
|
282
|
-
.subscribe((projectUser: any) => {
|
|
281
|
+
this.wsService.updateCurrentUserAvailability(this.tiledeskToken, projectid, available).subscribe((projectUser: any) => {
|
|
283
282
|
|
|
284
283
|
this.logger.log('[PROJECT-ITEM] - PROJECT-USER UPDATED ', projectUser)
|
|
285
|
-
|
|
286
284
|
// NOTIFY TO THE USER SERVICE WHEN THE AVAILABLE / UNAVAILABLE BUTTON IS CLICKED
|
|
287
285
|
// this.usersService.availability_btn_clicked(true)
|
|
288
286
|
|
|
@@ -312,8 +310,11 @@ export class ProjectItemComponent implements OnInit {
|
|
|
312
310
|
}
|
|
313
311
|
}
|
|
314
312
|
});
|
|
315
|
-
|
|
316
|
-
|
|
313
|
+
//not sound if unservedRequest is already chached and web-sk is closed and restart again
|
|
314
|
+
if(this.unservedRequestCount < count){
|
|
315
|
+
this.unservedRequestCount = count;
|
|
316
|
+
this.events.publish('unservedRequest:count', this.unservedRequestCount)
|
|
317
|
+
}
|
|
317
318
|
}
|
|
318
319
|
}, error => {
|
|
319
320
|
this.logger.error('[PROJECT-ITEM] UNSERVED REQUEST COUNT * error * ', error)
|
|
@@ -1232,33 +1232,33 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1232
1232
|
this.logger.log('[CONVS-DETAIL] - loadTagsCanned conversationWith_segments ', conversationWith_segments)
|
|
1233
1233
|
let projectId = ''
|
|
1234
1234
|
|
|
1235
|
-
|
|
1235
|
+
if (conversationWith_segments.length === 4) {
|
|
1236
1236
|
projectId = conversationWith_segments[2]
|
|
1237
1237
|
this.logger.log('[CONVS-DETAIL] - loadTagsCanned projectId ', projectId)
|
|
1238
1238
|
this.getAndShowCannedResponses(strSearch, projectId)
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1239
|
+
} else {
|
|
1240
|
+
this.getProjectIdByConversationWith(strSearch, this.conversationWith)
|
|
1241
|
+
}
|
|
1242
1242
|
}
|
|
1243
1243
|
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1244
|
+
getProjectIdByConversationWith(strSearch, conversationWith: string) {
|
|
1245
|
+
const tiledeskToken = this.tiledeskAuthService.getTiledeskToken()
|
|
1246
|
+
|
|
1247
|
+
this.tiledeskService.getProjectIdByConvRecipient(tiledeskToken, conversationWith).subscribe((res) => {
|
|
1248
|
+
this.logger.log('[CONVS-DETAIL] - loadTagsCanned - GET PROJECTID BY CONV RECIPIENT RES', res)
|
|
1249
|
+
if (res) {
|
|
1250
|
+
const projectId = res.id_project
|
|
1251
|
+
this.logger.log('[CONVS-DETAIL] - loadTagsCanned - GET PROJECTID BY CONV RECIPIENT projectId ', projectId)
|
|
1252
|
+
if (projectId) {
|
|
1253
|
+
this.getAndShowCannedResponses(strSearch, projectId)
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
}, (error) => {
|
|
1257
|
+
this.logger.error('[CONVS-DETAIL] - loadTagsCanned - GET PROJECTID BY CONV RECIPIENT - ERROR ', error)
|
|
1258
|
+
}, () => {
|
|
1259
|
+
this.logger.log('[CONVS-DETAIL] - loadTagsCanned - GET PROJECTID BY CONV RECIPIENT * COMPLETE *')
|
|
1260
|
+
})
|
|
1261
|
+
}
|
|
1262
1262
|
|
|
1263
1263
|
getAndShowCannedResponses(strSearch, projectId) {
|
|
1264
1264
|
const tiledeskToken = this.tiledeskAuthService.getTiledeskToken()
|
|
@@ -909,37 +909,37 @@ export class ConversationListPage implements OnInit {
|
|
|
909
909
|
|
|
910
910
|
if (conversationId.startsWith('support-group')) {
|
|
911
911
|
let project_id = ''
|
|
912
|
-
|
|
912
|
+
if (conversationWith_segments.length === 4) {
|
|
913
913
|
project_id = conversationWith_segments[2]
|
|
914
914
|
|
|
915
915
|
const tiledeskToken = this.tiledeskAuthService.getTiledeskToken()
|
|
916
916
|
this.archiveSupportGroupConv(tiledeskToken,project_id,conversationId,)
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
917
|
+
} else {
|
|
918
|
+
this.getProjectIdByConversationWith(conversationId)
|
|
919
|
+
}
|
|
920
920
|
} else {
|
|
921
921
|
this.conversationsHandlerService.archiveConversation(conversationId)
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
925
|
|
|
926
|
-
|
|
927
|
-
|
|
926
|
+
getProjectIdByConversationWith(conversationId: string) {
|
|
927
|
+
const tiledeskToken = this.tiledeskAuthService.getTiledeskToken()
|
|
928
928
|
|
|
929
|
-
|
|
930
|
-
|
|
929
|
+
this.tiledeskService.getProjectIdByConvRecipient(tiledeskToken, conversationId).subscribe((res) => {
|
|
930
|
+
this.logger.log('[CONVS-LIST-PAGE] - GET PROJECTID BY CONV RECIPIENT RES',res)
|
|
931
931
|
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
932
|
+
if (res) {
|
|
933
|
+
const project_id = res.id_project
|
|
934
|
+
this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT project_id',project_id)
|
|
935
|
+
this.archiveSupportGroupConv(tiledeskToken,project_id,conversationId)
|
|
936
|
+
}
|
|
937
|
+
},(error) => {
|
|
938
|
+
this.logger.error('[CONVS-LIST-PAGE] - GET PROJECTID BY CONV RECIPIENT - ERROR ',error)
|
|
939
|
+
},() => {
|
|
940
|
+
this.logger.log('[CONVS-LIST-PAGE] - GET PROJECTID BY CONV RECIPIENT * COMPLETE *')
|
|
941
|
+
})
|
|
942
|
+
}
|
|
943
943
|
|
|
944
944
|
archiveSupportGroupConv(tiledeskToken, project_id, conversationId) {
|
|
945
945
|
this.logger.log('[CONVS-LIST-PAGE] - onCloseConversation projectId: ',project_id)
|
|
@@ -107,29 +107,29 @@ export class CreateCannedResponsePage implements OnInit {
|
|
|
107
107
|
this.logger.log('[CREATE-CANNED-RES] - loadTagsCanned conversationWith_segments ', conversationWith_segments)
|
|
108
108
|
// let projectId = ''
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
if (conversationWith_segments.length === 4) {
|
|
111
111
|
this.prjctID = conversationWith_segments[2]
|
|
112
112
|
this.logger.log('[CREATE-CANNED-RES] - loadTagsCanned projectId ', this.prjctID)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
} else {
|
|
114
|
+
this.getProjectIdByConversationWith(conversation_id, tiledeskToken)
|
|
115
|
+
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
118
|
+
getProjectIdByConversationWith(conversationWith: string, tiledeskToken: string) {
|
|
119
|
+
// const tiledeskToken = this.tiledeskAuthService.getTiledeskToken()
|
|
120
|
+
|
|
121
|
+
this.tiledeskService.getProjectIdByConvRecipient(tiledeskToken, conversationWith).subscribe((res) => {
|
|
122
|
+
this.logger.log('[CREATE-CANNED-RES] - GET PROJECTID BY CONV RECIPIENT RES', res)
|
|
123
|
+
if (res) {
|
|
124
|
+
this.prjctID = res.id_project
|
|
125
|
+
this.logger.log('[CREATE-CANNED-RES] - GET PROJECTID BY CONV RECIPIENT projectId ', this.prjctID)
|
|
126
|
+
}
|
|
127
|
+
}, (error) => {
|
|
128
|
+
this.logger.error('[CREATE-CANNED-RES] - GET PROJECTID BY CONV RECIPIENT - ERROR ', error)
|
|
129
|
+
},() => {
|
|
130
|
+
this.logger.log('[CREATE-CANNED-RES] - GET PROJECTID BY CONV RECIPIENT * COMPLETE *',)
|
|
131
|
+
})
|
|
132
|
+
}
|
|
133
133
|
|
|
134
134
|
|
|
135
135
|
buildForm() {
|