@chat21/chat21-ionic 3.4.20 → 3.4.21-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
@@ -8,6 +8,9 @@
8
8
  ### **Copyrigth**:
9
9
  *Tiledesk SRL*
10
10
 
11
+ # 3.4.21-rc1
12
+ - **added**: implement badge notification for agentDesktop sw when new conversation is assigned to logged agent
13
+
11
14
  # 3.4.20 in PROD
12
15
 
13
16
  # 3.4.19 in PROD
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.20",
4
+ "version": "3.4.21-rc1",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -168,6 +168,7 @@ export class AppComponent implements OnInit {
168
168
  }, { capture: true });
169
169
  }
170
170
 
171
+
171
172
  listenChatAlreadyOpenWithoutParamsInMobileMode() {
172
173
  this.events.subscribe('noparams:mobile', (isAlreadyOpenInMobileMode) => {
173
174
  // console.log('[APP-COMP] Chat is Already Open In Mobile Mode ', isAlreadyOpenInMobileMode)
@@ -1110,6 +1111,7 @@ export class AppComponent implements OnInit {
1110
1111
  if (conversation && conversation.is_new === true && this.isInitialized) {
1111
1112
  this.manageTabNotification('conv_added', conversation.sound)
1112
1113
  this.manageEventNewConversation(conversation)
1114
+ this.manageNotification(conversation);
1113
1115
  }
1114
1116
  if(conversation) this.updateConversationsOnStorage()
1115
1117
  });
@@ -1635,6 +1637,14 @@ export class AppComponent implements OnInit {
1635
1637
  this.triggerEvents.triggerOnNewConversationInit(conversation)
1636
1638
  }
1637
1639
 
1640
+ private manageNotification(conversation: ConversationModel) {
1641
+ this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP', conversation);
1642
+ if(window['AGENTDESKTOP']){
1643
+ this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP', window['AGENTDESKTOP']);
1644
+ window['AGENTDESKTOP']['TAB'].Badge(this.conversationsHandlerService.countIsNew())
1645
+ }
1646
+ }
1647
+
1638
1648
 
1639
1649
  @HostListener('document:visibilitychange', [])
1640
1650
  visibilitychange() {