@chat21/chat21-ionic 3.0.68-rc.2 → 3.0.68-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 CHANGED
@@ -1,5 +1,8 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.0.68-rc3
4
+ - bug-fixed: not sound with unservedRequest if WebSocket restart again (every 3/5min)
5
+
3
6
  ### 3.0.68-rc2
4
7
  - bug-fixed: removed lookup API call for old requests
5
8
 
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-rc.2",
4
+ "version": "3.0.68-rc.3",
5
5
  "license": "AGPL-3.0",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -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
 
@@ -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
- this.unservedRequestCount = count;
316
- this.events.publish('unservedRequest:count', this.unservedRequestCount)
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)