0ce70d0eb6aa2f32a5381cb3780b8238bd9fbba8
[motion2.git] / server / api / chatInteraction / chatInteraction.socket.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x4fd9=['removeListener','register','length','chatInteraction:','./chatInteraction.events','remove','update','emit'];(function(_0x584497,_0x45f0cb){var _0x374bf1=function(_0x8eb68){while(--_0x8eb68){_0x584497['push'](_0x584497['shift']());}};_0x374bf1(++_0x45f0cb);}(_0x4fd9,0x6c));var _0x94fd=function(_0x161c21,_0x89e43e){_0x161c21=_0x161c21-0x0;var _0x3342ff=_0x4fd9[_0x161c21];return _0x3342ff;};'use strict';var ChatInteractionEvents=require(_0x94fd('0x0'));var events=['save',_0x94fd('0x1'),_0x94fd('0x2')];function createListener(_0x381baa,_0x34b015){return function(_0x32037c){_0x34b015[_0x94fd('0x3')](_0x381baa,_0x32037c);};}function removeListener(_0x47beca,_0x405044){return function(){ChatInteractionEvents[_0x94fd('0x4')](_0x47beca,_0x405044);};}exports[_0x94fd('0x5')]=function(_0x22479b){for(var _0x676339=0x0,_0x5e221c=events[_0x94fd('0x6')];_0x676339<_0x5e221c;_0x676339++){var _0x217e2e=events[_0x676339];var _0x388e66=createListener(_0x94fd('0x7')+_0x217e2e,_0x22479b);ChatInteractionEvents['on'](_0x217e2e,_0x388e66);}};