@chat21/chat21-ionic 3.0.68 → 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 CHANGED
@@ -1,5 +1,8 @@
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
+
3
6
  ### 3.0.68 in PROD
4
7
 
5
8
  ### 3.0.68-rc3
@@ -18,9 +18,9 @@ cp -p src/manifest.json platforms/browser/www/
18
18
  cp -p src/chat-config.json platforms/browser/www/
19
19
 
20
20
  cd platforms/browser/www
21
- aws s3 sync . s3://tiledesk-console/v2/chat/
22
- aws s3 sync . s3://tiledesk-console/v2/chat/$version/
23
- # aws s3 sync . s3://tiledesk-console/v2/chat/latest/
21
+ # aws s3 sync . s3://tiledesk-console/v2/chat/
22
+ # aws s3 sync . s3://tiledesk-console/v2/chat/$version/
23
+ aws s3 sync . s3://tiledesk-console/v2/chat/latest/
24
24
  cd ../../../
25
25
 
26
26
  # aws cloudfront create-invalidation --distribution-id E36UIP90GOSFPM --paths "/*"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.0.68",
4
+ "version": "3.0.69-rc1",
5
5
  "license": "AGPL-3.0",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -1139,6 +1139,8 @@ export class AppComponent implements OnInit {
1139
1139
  // that.presentToast();
1140
1140
  }
1141
1141
  });
1142
+ } else {
1143
+ this.removePresenceAndLogout()
1142
1144
  }
1143
1145
  }
1144
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
- // if (conversationWith_segments.length === 4) {
103
+ if (conversationWith_segments.length === 4) {
104
104
  this.project_id = conversationWith_segments[2];
105
105
  this.selectInfoContentTypeInfoSupportGroup();
106
- // } else {
107
- // this.getProjectIdByConversationWith(this.conversationWith)
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
- // getProjectIdByConversationWith(conversationWith: string) {
119
- // const tiledeskToken = this.tiledeskAuthService.getTiledeskToken();
118
+ getProjectIdByConversationWith(conversationWith: string) {
119
+ const tiledeskToken = this.tiledeskAuthService.getTiledeskToken();
120
120
 
121
- // this.tiledeskService.getProjectIdByConvRecipient(tiledeskToken, conversationWith).subscribe(res => {
122
- // this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT RES', res);
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
- // 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
- // }
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
- // }, (error) => {
130
- // this.logger.error('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT - ERROR ', error);
129
+ }, (error) => {
130
+ this.logger.error('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT - ERROR ', error);
131
131
 
132
- // }, () => {
133
- // this.logger.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT * COMPLETE *');
134
- // this.selectInfoContentTypeInfoSupportGroup();
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');
@@ -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
- // if (conversationWith_segments.length === 4) {
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
- // } else {
1240
- // this.getProjectIdByConversationWith(strSearch, this.conversationWith)
1241
- // }
1239
+ } else {
1240
+ this.getProjectIdByConversationWith(strSearch, this.conversationWith)
1241
+ }
1242
1242
  }
1243
1243
 
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
- // }
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
- // if (conversationWith_segments.length === 4) {
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
- // } else {
918
- // this.getProjectIdByConversationWith(conversationId)
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
- // getProjectIdByConversationWith(conversationId: string) {
927
- // const tiledeskToken = this.tiledeskAuthService.getTiledeskToken()
926
+ getProjectIdByConversationWith(conversationId: string) {
927
+ const tiledeskToken = this.tiledeskAuthService.getTiledeskToken()
928
928
 
929
- // this.tiledeskService.getProjectIdByConvRecipient(tiledeskToken, conversationId).subscribe((res) => {
930
- // this.logger.log('[CONVS-LIST-PAGE] - GET PROJECTID BY CONV RECIPIENT RES',res)
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
- // 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
- // }
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
- // if (conversationWith_segments.length === 4) {
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
- // } else {
114
- // this.getProjectIdByConversationWith(conversation_id, tiledeskToken)
115
- // }
113
+ } else {
114
+ this.getProjectIdByConversationWith(conversation_id, tiledeskToken)
115
+ }
116
116
  }
117
117
 
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
- // }
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() {