@tiledesk/tiledesk-server 2.5.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@
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
@@ -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