Built motion from commit a61a4a20.|2.5.46
[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 _0xf734=['register','length','remove','update','emit'];(function(_0x3e112d,_0x2bb132){var _0x531c31=function(_0x1954bc){while(--_0x1954bc){_0x3e112d['push'](_0x3e112d['shift']());}};_0x531c31(++_0x2bb132);}(_0xf734,0x129));var _0x4f73=function(_0x39c928,_0x4ca131){_0x39c928=_0x39c928-0x0;var _0x3e4b23=_0xf734[_0x39c928];return _0x3e4b23;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=['save',_0x4f73('0x0'),_0x4f73('0x1')];function createListener(_0x1d578f,_0x192acb){return function(_0x5dea58){_0x192acb[_0x4f73('0x2')](_0x1d578f,_0x5dea58);};}function removeListener(_0x5d8421,_0x394946){return function(){ChatInteractionEvents['removeListener'](_0x5d8421,_0x394946);};}exports[_0x4f73('0x3')]=function(_0x2f0171){for(var _0x4a4554=0x0,_0xea4520=events[_0x4f73('0x4')];_0x4a4554<_0xea4520;_0x4a4554++){var _0x22ed76=events[_0x4a4554];var _0x4206cb=createListener('chatInteraction:'+_0x22ed76,_0x2f0171);ChatInteractionEvents['on'](_0x22ed76,_0x4206cb);}};