@chat21/chat21-ionic 3.4.27-rc20 → 3.4.27-rc22

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
@@ -8,6 +8,13 @@
8
8
  ### **Copyrigth**:
9
9
  *Tiledesk SRL*
10
10
 
11
+ # 3.4.27-rc22
12
+ - **added**: new WsWorker to manage iframe chrome throttling while tab is in background or hidden
13
+
14
+ # 3.4.27-rc21
15
+ - **changed**: new wss reconnect and timeout keepalive
16
+ - **bug-fixed**: cannot route if senderFullaname contains /
17
+
11
18
  # 3.4.27-rc20
12
19
  - **added**: onOpenTicketExternally event in triggerEvents service
13
20
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.4.27-rc20",
4
+ "version": "3.4.27-rc22",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -896,7 +896,7 @@ export class AppComponent implements OnInit {
896
896
 
897
897
  let pageUrl = 'conversation-detail/'
898
898
  if (IDConv && FullNameConv) {
899
- pageUrl += IDConv + '/' + FullNameConv + '/' + Convtype
899
+ pageUrl += IDConv + '/' + encodeURIComponent(FullNameConv) + '/' + Convtype
900
900
  }
901
901
 
902
902
  const queryParams = this.route.snapshot.queryParams;
@@ -904,7 +904,7 @@ export class AppComponent implements OnInit {
904
904
  pageUrl += queryString ? `?${queryString}` : '';
905
905
 
906
906
  // replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
907
- this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29').replace( /#/g, "%23" ));
907
+ this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'));
908
908
 
909
909
 
910
910
  // const DASHBOARD_URL = this.appConfigProvider.getConfig().DASHBOARD_URL;
@@ -1301,10 +1301,7 @@ export class AppComponent implements OnInit {
1301
1301
  const WS_URL = appconfig.wsUrl + '?token=' + tiledeskToken
1302
1302
  this.logger.log('[WEBSOCKET-JS] connetWebsocket called in [PROJECT-ITEM] wsUrl ', WS_URL)
1303
1303
  this.webSocketJs.init(
1304
- WS_URL,
1305
- undefined,
1306
- undefined,
1307
- undefined
1304
+ WS_URL
1308
1305
  );
1309
1306
  }
1310
1307
 
@@ -1356,7 +1353,7 @@ export class AppComponent implements OnInit {
1356
1353
  subscribeChangedConversationSelected = (user: UserModel, type: string) => {
1357
1354
  this.logger.log('[APP-COMP] subscribeUidConvSelectedChanged navigateByUrl', user, type);
1358
1355
  // this.router.navigateByUrl('conversation-detail/' + user.uid + '?conversationWithFullname=' + user.fullname);
1359
- this.router.navigateByUrl('conversation-detail/' + user.uid + '/' + user.fullname + '/' + type);
1356
+ this.router.navigateByUrl('conversation-detail/' + user.uid + '/' + encodeURIComponent(user.fullname) + '/' + type);
1360
1357
  }
1361
1358
 
1362
1359
  subscribeProfileInfoButtonLogOut = (hasClickedLogout) => {
@@ -1532,10 +1529,10 @@ export class AppComponent implements OnInit {
1532
1529
  let Convtype = 'active'
1533
1530
 
1534
1531
  if (IDConv && FullNameConv) {
1535
- pageUrl += IDConv + '/' + FullNameConv + '/' + Convtype
1532
+ pageUrl += IDConv + '/' + encodeURIComponent(FullNameConv) + '/' + Convtype
1536
1533
  }
1537
1534
  // replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
1538
- this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29').replace( /#/g, "%23" ));
1535
+ this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'));
1539
1536
  } else {
1540
1537
  console.log("FCM: Received in foreground", JSON.stringify(data));
1541
1538
  // let IDConv = data.recipient
@@ -1546,7 +1543,7 @@ export class AppComponent implements OnInit {
1546
1543
  // pageUrl += IDConv + '/' + FullNameConv + '/' + Convtype
1547
1544
  // }
1548
1545
  // // replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
1549
- // this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29').replace( /#/g, "%23" ));
1546
+ // this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'));
1550
1547
  };
1551
1548
  });
1552
1549
  }
@@ -70,8 +70,8 @@ export class InfoContentComponent implements OnInit {
70
70
  this.route.paramMap.subscribe(params => {
71
71
  this.logger.log('[INFO-CONTENT-COMP] initialize params: ', params);
72
72
  this.conversationWith = params.get('IDConv');
73
- this.conversationWithFullname = params.get('FullNameConv');
74
- this.conv_type = params.get('Convtype');
73
+ this.conversationWithFullname = decodeURIComponent(params.get('FullNameConv'));
74
+ this.conv_type = decodeURIComponent(params.get('Convtype'));
75
75
 
76
76
  const conversationWith_segments = this.conversationWith.split('-');
77
77
 
@@ -262,8 +262,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
262
262
  this.route.paramMap.subscribe((params) => {
263
263
  this.logger.log('[CONVS-DETAIL] - constructor -> params: ', params)
264
264
  this.conversationWith = params.get('IDConv')
265
- this.conversationWithFullname = params.get('FullNameConv')
266
- this.conv_type = params.get('Convtype')
265
+ this.conversationWithFullname = decodeURIComponent(params.get('FullNameConv'))
266
+ this.conv_type = decodeURIComponent(params.get('Convtype'))
267
267
 
268
268
  this.events.publish('supportconvid:haschanged', this.conversationWith)
269
269
  })
@@ -925,24 +925,22 @@ export class ConversationListPage implements OnInit {
925
925
  this.logger.log('[CONVS-LIST-PAGE] checkPlatformIsMobile(): ', checkPlatformIsMobile())
926
926
  this.logger.log('[CONVS-LIST-PAGE] DESKTOP (window < 768)', this.navService)
927
927
  this.logger.log('[CONVS-LIST-PAGE] navigateByUrl this.conversationSelected conversation_with_fullname ', this.conversationSelected)
928
- let pageUrl = 'conversation-detail/' + this.uidConvSelected + '/' + this.conversationSelected.conversation_with_fullname + '/' + converationType
929
- pageUrl += queryString ? `?${queryString}` : '';
928
+ let pageUrl = 'conversation-detail/' + this.uidConvSelected + '/' + encodeURIComponent(this.conversationSelected.conversation_with_fullname) + '/' + converationType
930
929
  this.logger.log('[CONVS-LIST-PAGE] pageURL', pageUrl)
931
930
  // replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
932
- this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29').replace( /#/g, "%23" ), {replaceUrl: true})
931
+ this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'), {replaceUrl: true})
933
932
  } else {
934
933
  this.logger.log('[CONVS-LIST-PAGE] navigateByUrl this.conversationSelected conversation_with_fullname ', this.conversationSelected)
935
934
  this.logger.log('[CONVS-LIST-PAGE] checkPlatformIsMobile(): ', checkPlatformIsMobile())
936
935
  this.logger.log('[CONVS-LIST-PAGE] MOBILE (window >= 768) ', this.navService)
937
936
  let pageUrl = 'conversation-detail/' + this.uidConvSelected
938
937
  if (this.conversationSelected && this.conversationSelected.conversation_with_fullname) {
939
- pageUrl = 'conversation-detail/' + this.uidConvSelected + '/' + this.conversationSelected.conversation_with_fullname + '/' + converationType
938
+ pageUrl = 'conversation-detail/' + this.uidConvSelected + '/' + encodeURIComponent(this.conversationSelected.conversation_with_fullname) + '/' + converationType
940
939
  }
941
940
  pageUrl += queryString ? `?${queryString}` : '';
942
941
  this.logger.log('[CONVS-LIST-PAGE] setUidConvSelected navigateByUrl--->: ', pageUrl)
943
942
  // replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
944
-
945
- this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29').replace( /#/g, "%23" ), {replaceUrl: true})
943
+ this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'), {replaceUrl: true})
946
944
  }
947
945
  }
948
946
 
@@ -4,7 +4,6 @@ import { Router, NavigationExtras } from '@angular/router';
4
4
 
5
5
  // utils
6
6
  import { checkPlatformIsMobile } from '../../chat21-core/utils/utils';
7
- // import { ConversationDetailPage } from '../pages/conversation-detail/conversation-detail.page';
8
7
 
9
8
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
10
9
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';