[FIX] Close stream properly at Omnichannel room when move to queue (#22015)

Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz>
pull/22076/head
Tiago Evangelista Pinto 4 years ago committed by Diego Sampaio
parent 5f9f5a7ab8
commit de2a738f4d
No known key found for this signature in database
GPG Key ID: E060152B30502562
  1. 3
      app/ui-cached-collection/client/models/CachedCollection.js
  2. 4
      client/views/room/Header/Omnichannel/QuickActions/QuickActions.tsx

@ -282,7 +282,8 @@ export class CachedCollection extends Emitter {
});
}
if (room) {
RoomManager.close(room.t + room.name);
room.name && RoomManager.close(room.t + room.name);
!room.name && RoomManager.close(room.t + room._id);
}
this.collection.remove(record._id);
} else {

@ -13,6 +13,7 @@ import React, {
} from 'react';
import toastr from 'toastr';
import { RoomManager } from '../../../../../../app/ui-utils/client';
import { handleError } from '../../../../../../app/utils/client';
import { IRoom } from '../../../../../../definition/IRoom';
import PlaceChatOnHoldModal from '../../../../../../ee/app/livechat-enterprise/client/components/modals/PlaceChatOnHoldModal';
@ -92,8 +93,7 @@ const QuickActions: FC<QuickActionsProps> = ({ room, className }) => {
try {
await requestTranscript(rid, email, subject);
closeModal();
Session.set('openedRoom', null);
FlowRouter.go('/home');
RoomManager.close(`l${rid}`);
toastr.success(t('Livechat_transcript_has_been_requested'));
} catch (error) {
handleError(error);

Loading…
Cancel
Save