@tiledesk/tiledesk-server 2.4.103 → 2.5.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.
package/CHANGELOG.md CHANGED
@@ -5,12 +5,23 @@
5
5
  🚀 IN PRODUCTION 🚀
6
6
  (https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
7
7
 
8
+ # 2.5.1
9
+ - Bug fix: reset busy status for agents when smart assignment is enabled
10
+ - Added possibility to delete chat21 conversation
11
+ - Updated tybot-connector to 0.2.56
12
+
8
13
  # 2.5.0
9
14
  - Added new pricing modules
10
15
  - Added integrations route
11
16
  - Added new kb route
12
17
  - Added mqttTest module
13
18
 
19
+ # 2.4.103
20
+ - Added new pricing modules
21
+ - Added integrations route
22
+ - Added new kb route
23
+ - Added mqttTest module
24
+
14
25
  # 2.4.102
15
26
  - Updated whatsapp-connector to 0.1.63
16
27
  - Updated messenger-connector to 0.1.17
@@ -666,7 +666,7 @@ class Chat21Handler {
666
666
  });
667
667
  });
668
668
 
669
- // archive: function(recipient_id, user_id){
669
+ // archive: function(recipient_id, user_id){
670
670
  chat21.conversations.archive(request.request_id, "system")
671
671
  .then(function(data){
672
672
  winston.verbose("Chat21 archived for system"+ JSON.stringify(data));
@@ -699,7 +699,28 @@ class Chat21Handler {
699
699
  });
700
700
  });
701
701
 
702
-
702
+ requestEvent.on('request.delete', function(request) {
703
+
704
+ winston.debug("chat21Handler requestEvent request.delete called" , request);
705
+
706
+ setImmediate(() => {
707
+ if (request.channelOutbound.name === ChannelConstants.CHAT21) {
708
+
709
+ chat21.auth.setAdminToken(adminToken);
710
+
711
+ winston.debug("Chat21Sender deleting conversations for ",request.participants);
712
+
713
+ chat21.conversations.delete(request.request_id).then((data) => {
714
+ winston.verbose("Chat21 conversation archived result "+ JSON.stringify(data));
715
+ chat21Event.emit('conversation.deleted', data);
716
+ }).catch((err) => {
717
+ winston.error("Chat21 deleted err", err);
718
+ chat21Event.emit('conversation.deleted.error', err);
719
+ })
720
+ }
721
+ })
722
+
723
+ });
703
724
 
704
725
  requestEvent.on('request.participants.update', function(data) {
705
726