@chat21/chat21-ionic 3.0.68 → 3.0.70-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.
Files changed (63) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +6 -657
  3. package/README.md +4 -2
  4. package/config.xml +2 -3
  5. package/package.json +5 -5
  6. package/resources/android/icon/drawable-hdpi-icon.png +0 -0
  7. package/resources/android/icon/drawable-ldpi-icon.png +0 -0
  8. package/resources/android/icon/drawable-mdpi-icon.png +0 -0
  9. package/resources/android/icon/drawable-xhdpi-icon.png +0 -0
  10. package/resources/android/icon/drawable-xxhdpi-icon.png +0 -0
  11. package/resources/android/icon/drawable-xxxhdpi-icon.png +0 -0
  12. package/resources/android/icon.png +0 -0
  13. package/resources/android/splash/drawable-land-hdpi-screen.png +0 -0
  14. package/resources/android/splash/drawable-land-ldpi-screen.png +0 -0
  15. package/resources/android/splash/drawable-land-mdpi-screen.png +0 -0
  16. package/resources/android/splash/drawable-land-xhdpi-screen.png +0 -0
  17. package/resources/android/splash/drawable-land-xxhdpi-screen.png +0 -0
  18. package/resources/android/splash/drawable-land-xxxhdpi-screen.png +0 -0
  19. package/resources/android/splash/drawable-port-hdpi-screen.png +0 -0
  20. package/resources/android/splash/drawable-port-ldpi-screen.png +0 -0
  21. package/resources/android/splash/drawable-port-mdpi-screen.png +0 -0
  22. package/resources/android/splash/drawable-port-xhdpi-screen.png +0 -0
  23. package/resources/android/splash/drawable-port-xxhdpi-screen.png +0 -0
  24. package/resources/android/splash/drawable-port-xxxhdpi-screen.png +0 -0
  25. package/resources/android/splash.png +0 -0
  26. package/resources/android/xml/network_security_config.xml +6 -0
  27. package/resources/ios/icon/icon-1024.png +0 -0
  28. package/resources/ios/icon/icon-108@2x.png +0 -0
  29. package/resources/ios/icon/icon-20.png +0 -0
  30. package/resources/ios/icon/icon-20@2x.png +0 -0
  31. package/resources/ios/icon/icon-20@3x.png +0 -0
  32. package/resources/ios/icon/icon-24@2x.png +0 -0
  33. package/resources/ios/icon/icon-27.5@2x.png +0 -0
  34. package/resources/ios/icon/icon-29.png +0 -0
  35. package/resources/ios/icon/icon-29@2x.png +0 -0
  36. package/resources/ios/icon/icon-29@3x.png +0 -0
  37. package/resources/ios/icon/icon-40.png +0 -0
  38. package/resources/ios/icon/icon-40@2x.png +0 -0
  39. package/resources/ios/icon/icon-40@3x.png +0 -0
  40. package/resources/ios/icon/icon-44@2x.png +0 -0
  41. package/resources/ios/icon/icon-50.png +0 -0
  42. package/resources/ios/icon/icon-50@2x.png +0 -0
  43. package/resources/ios/icon/icon-60.png +0 -0
  44. package/resources/ios/icon/icon-60@2x.png +0 -0
  45. package/resources/ios/icon/icon-60@3x.png +0 -0
  46. package/resources/ios/icon/icon-72.png +0 -0
  47. package/resources/ios/icon/icon-72@2x.png +0 -0
  48. package/resources/ios/icon/icon-76.png +0 -0
  49. package/resources/ios/icon/icon-76@2x.png +0 -0
  50. package/resources/ios/icon/icon-83.5@2x.png +0 -0
  51. package/resources/ios/icon/icon-86@2x.png +0 -0
  52. package/resources/ios/icon/icon-98@2x.png +0 -0
  53. package/resources/ios/icon/icon@2x.png +0 -0
  54. package/resources/ios/icon.png +0 -0
  55. package/resources/ios/splash.jpg +0 -0
  56. package/resources/ios/splash.png +0 -0
  57. package/src/app/app.component.ts +16 -5
  58. package/src/app/components/conversation-info/info-content/info-content.component.ts +19 -19
  59. package/src/app/pages/conversation-detail/conversation-detail.page.ts +22 -22
  60. package/src/app/pages/conversations-list/conversations-list.page.ts +34 -34
  61. package/src/app/pages/create-canned-response/create-canned-response.page.ts +19 -19
  62. package/src/chat-config-native-mqtt.json +3 -3
  63. package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +52 -39
package/README.md CHANGED
@@ -6,6 +6,9 @@
6
6
 
7
7
  Chat21 is the core of the open source live chat platform [Tiledesk.com](http://www.tiledesk.com).
8
8
 
9
+ ## Community? Questions? Support?
10
+ If you need help or just want to hang out, come, say hi on our [<img width="15" alt="Tiledesk discord" src="https://seeklogo.com/images/D/discord-color-logo-E5E6DFEF80-seeklogo.com.png"> Discord](https://discord.gg/WQPfqShJ) server.
11
+
9
12
  # Features #
10
13
  With Chat21-ionic you can:
11
14
  * Send a direct message to a user (one to one message)
@@ -185,5 +188,4 @@ To auto login pass the JWT token as a query parameter of your Chat url as in the
185
188
 
186
189
  "http://localhost:8100/#/conversation-detail?jwt=<JWT_TOKEN>"
187
190
 
188
- ```
189
-
191
+ ```
package/config.xml CHANGED
@@ -18,10 +18,10 @@
18
18
  <preference name="SplashMaintainAspectRatio" value="true" />
19
19
  <preference name="FadeSplashScreenDuration" value="300" />
20
20
  <preference name="SplashShowOnlyFirstTime" value="false" />
21
- <preference name="SplashScreen" value="assets/logo.png" />
21
+ <preference name="SplashScreen" value="screen" />
22
22
  <preference name="SplashScreenDelay" value="3000" />
23
23
  <platform name="android">
24
- <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
24
+ <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
25
25
  <application android:networkSecurityConfig="@xml/network_security_config" />
26
26
  </edit-config>
27
27
  <resource-file src="resources/android/xml/network_security_config.xml" target="res/xml/network_security_config.xml" />
@@ -99,7 +99,6 @@
99
99
  <splash height="1792" src="resources/ios/splash/Default-1792h~iphone.png" width="828" />
100
100
  <splash height="828" src="resources/ios/splash/Default-Landscape-1792h~iphone.png" width="1792" />
101
101
  </platform>
102
- <engine name="android" spec="^6.2.3" />
103
102
  <engine name="browser" spec="^5.0.4" />
104
103
  <engine name="ios" spec="6.1.1" />
105
104
  <plugin name="cordova-android-support-gradle-release" spec="^3.0.1">
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.70-rc.1",
5
5
  "license": "AGPL-3.0",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -44,7 +44,6 @@
44
44
  "@ngx-translate/http-loader": "^4.0.0",
45
45
  "angular2-moment": "^1.9.0",
46
46
  "autolinker": "^3.14.2",
47
- "cordova-android": "^6.2.3",
48
47
  "cordova-android-support-gradle-release": "^3.0.1",
49
48
  "cordova-browser": "^5.0.4",
50
49
  "cordova-ios": "6.1.1",
@@ -84,6 +83,7 @@
84
83
  "@types/jasmine": "~3.3.8",
85
84
  "@types/jasminewd2": "~2.0.3",
86
85
  "codelyzer": "^5.0.0",
86
+ "cordova-android": "^9.1.0",
87
87
  "cordova-plugin-add-swift-support": "^2.0.2",
88
88
  "jasmine-core": "~3.4.0",
89
89
  "jasmine-spec-reporter": "~4.2.1",
@@ -114,9 +114,9 @@
114
114
  "cordova-plugin-network-information": {}
115
115
  },
116
116
  "platforms": [
117
- "android",
118
117
  "browser",
119
- "ios"
118
+ "ios",
119
+ "android"
120
120
  ]
121
121
  }
122
- }
122
+ }
Binary file
Binary file
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <network-security-config>
3
+ <domain-config cleartextTrafficPermitted="true">
4
+ <domain includeSubdomains="true">localhost</domain>
5
+ </domain-config>
6
+ </network-security-config>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -102,6 +102,7 @@ export class AppComponent implements OnInit {
102
102
  public missingConnectionToast: any
103
103
  public executedInitializeAppByWatchConnection: boolean = false;
104
104
  private isInitialized: boolean = false;
105
+ private hasToSoundUnservedRequestCount: boolean = false;
105
106
  private version: string;
106
107
  IS_ONLINE: boolean;
107
108
  IS_ON_MOBILE_DEVICE: boolean;
@@ -863,7 +864,7 @@ export class AppComponent implements OnInit {
863
864
  if(sound_status && sound_status !== 'undefined'){
864
865
  this.isSoundEnabled = sound_status === 'enabled'? true: false
865
866
  }
866
- // this.logger.debug('[APP-COMP] manageTabNotification can saund?', this.isInitialized, this.isSoundEnabled)
867
+ this.logger.debug('[APP-COMP] manageTabNotification can saund?', this.isInitialized, this.isSoundEnabled)
867
868
  if(this.isInitialized && this.isSoundEnabled) this.soundMessage()
868
869
  }
869
870
 
@@ -1123,6 +1124,8 @@ export class AppComponent implements OnInit {
1123
1124
 
1124
1125
  if (hasClickedLogout === true) {
1125
1126
  this.appStorageService.removeItem('conversations')
1127
+ this.isInitialized = false;
1128
+ this.hasToSoundUnservedRequestCount = false;
1126
1129
  // ----------------------------------------------
1127
1130
  // PUSH NOTIFICATIONS
1128
1131
  // ----------------------------------------------
@@ -1139,13 +1142,21 @@ export class AppComponent implements OnInit {
1139
1142
  // that.presentToast();
1140
1143
  }
1141
1144
  });
1145
+ } else {
1146
+ this.removePresenceAndLogout()
1142
1147
  }
1143
1148
  }
1144
1149
  }
1145
1150
 
1146
1151
  subscribeUnservedRequestCount = (unservedRequestCount) => {
1147
1152
  if(unservedRequestCount && unservedRequestCount > 0){
1148
- this.manageTabNotification(unservedRequestCount) //sound and alternate title
1153
+ console.log("hasToSoundUnservedRequestCount::::", this.hasToSoundUnservedRequestCount, this.isInitialized)
1154
+ if(this.hasToSoundUnservedRequestCount){
1155
+ this.manageTabNotification(unservedRequestCount) //sound and alternate title
1156
+ } else {
1157
+ //not sound the first time
1158
+ this.hasToSoundUnservedRequestCount = true
1159
+ }
1149
1160
  }
1150
1161
  }
1151
1162
 
@@ -1228,10 +1239,10 @@ export class AppComponent implements OnInit {
1228
1239
  // reset timer and save conversation on storage after 2s
1229
1240
  clearTimeout(this.setTimeoutConversationsEvent);
1230
1241
  this.setTimeoutConversationsEvent = setTimeout(() => {
1231
- // that.logger.debug('[APP-COMP] updateConversationsOnStorage: reset timer and save conversations -> ', this.conversationsHandlerService.conversations.length)
1232
- // that.appStorageService.setItem('conversations', JSON.stringify(that.conversationsHandlerService.conversations))
1242
+ that.logger.debug('[APP-COMP] updateConversationsOnStorage: reset timer and save conversations -> ', this.conversationsHandlerService.conversations.length)
1243
+ that.appStorageService.setItem('conversations', JSON.stringify(that.conversationsHandlerService.conversations))
1233
1244
  that.isInitialized = true;
1234
- }, 2000);
1245
+ }, 10000);
1235
1246
  }
1236
1247
 
1237
1248
  private initArchivedConversationsHandler(userId: string) {
@@ -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()
@@ -237,7 +237,6 @@ export class ConversationListPage implements OnInit {
237
237
  this.logger.log('Called ionViewDidEnter')
238
238
  this.logger.log('[CONVS-LIST-PAGE] ionViewWillEnter uidConvSelected',this.uidConvSelected )
239
239
  this.listnerStart()
240
- // this.conversations = this.manageStoredConversations()
241
240
  // exit from app with hardware back button
242
241
  this.subscription = this.platform.backButton.subscribe(() => {
243
242
  navigator['app'].exitApp()
@@ -349,6 +348,7 @@ export class ConversationListPage implements OnInit {
349
348
  // ------------------------------------------------------------------ //
350
349
  initConversationsHandler() {
351
350
  // this.conversations = this.manageStoredConversations()
351
+ // this.manageStoredConversations()
352
352
  this.conversations = this.conversationsHandlerService.conversations
353
353
  this.logger.log('[CONVS-LIST-PAGE] - CONVERSATIONS ', this.conversations.length, this.conversations)
354
354
  // save conversationHandler in chatManager
@@ -356,18 +356,19 @@ export class ConversationListPage implements OnInit {
356
356
  this.showPlaceholder = false
357
357
  }
358
358
 
359
- private manageStoredConversations(): ConversationModel[] {
360
- let conversationsStored = []
361
- if(this.appStorageService.getItem('conversations')){
362
- conversationsStored = JSON.parse(this.appStorageService.getItem('conversations'))
363
- if(conversationsStored && conversationsStored.length > 0) {
364
- // this.conversationsHandlerService.conversations = conversationsStored
365
- this.logger.log('[CONVS-LIST-PAGE] retrive conversations from storage --> ', conversationsStored.length)
366
- this.events.publish('appcompSubscribeToConvs:loadingIsActive', false);
367
- }
368
- }
369
- return conversationsStored
370
- }
359
+ // private manageStoredConversations() {
360
+ // let conversationsStored = []
361
+ // if(this.appStorageService.getItem('conversations')){
362
+ // conversationsStored = JSON.parse(this.appStorageService.getItem('conversations'))
363
+ // if(conversationsStored && conversationsStored.length > 0) {
364
+ // // this.conversationsHandlerService.conversations = conversationsStored
365
+ // this.logger.log('[CONVS-LIST-PAGE] retrive conversations from storage --> ', conversationsStored.length)
366
+ // this.events.publish('appcompSubscribeToConvs:loadingIsActive', false);
367
+ // this.conversations.push(...conversationsStored)
368
+ // }
369
+ // }
370
+ // // this.conversations = this.conversationsHandlerService.conversations
371
+ // }
371
372
 
372
373
  initArchivedConversationsHandler() {
373
374
  const keysConversation = ['CLOSED', 'Resolve']
@@ -898,8 +899,7 @@ export class ConversationListPage implements OnInit {
898
899
  }
899
900
 
900
901
  if (conversationWith_segments.length === 4) {
901
- const lastArrayElement =
902
- conversationWith_segments[conversationWith_segments.length - 1]
902
+ const lastArrayElement = conversationWith_segments[conversationWith_segments.length - 1]
903
903
  this.logger.log('[CONVS-LIST-PAGE] - lastArrayElement ',lastArrayElement)
904
904
  this.logger.log('[CONVS-LIST-PAGE] - lastArrayElement length',lastArrayElement.length)
905
905
  // if (lastArrayElement.length !== 32) {
@@ -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() {
@@ -1,5 +1,5 @@
1
1
  {
2
- "t2y12PruGU9wUtEGzBJfolMIgK": "CAR:T",
2
+ "t2y12PruGU9wUtEGzBJfolMIgK": "CAR:T-PAY:T-ANA:T-ACT:T-APP:T",
3
3
  "chatEngine": "mqtt",
4
4
  "uploadEngine": "native",
5
5
  "pushEngine":"mqtt",
@@ -25,6 +25,6 @@
25
25
  },
26
26
  "apiUrl": "https://console.native.tiledesk.com/api/",
27
27
  "baseImageUrl": "https://console.native.tiledesk.com/api/",
28
- "authPersistence": "LOCAL",
29
- "car":true
28
+ "dashboardUrl": "https://console.native.tiledesk.com/dashboard/",
29
+ "authPersistence": "LOCAL"
30
30
  }