0799493ee4340e143081e3987fae937f5aa58e0b
[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 _0x4444=['length','chatInteraction:','save','remove','update','emit','removeListener','register'];(function(_0x5850b0,_0x4e7c3c){var _0x43b448=function(_0x320407){while(--_0x320407){_0x5850b0['push'](_0x5850b0['shift']());}};_0x43b448(++_0x4e7c3c);}(_0x4444,0x1a2));var _0x4444=function(_0x30f020,_0x7d2cfa){_0x30f020=_0x30f020-0x0;var _0x3933c0=_0x4444[_0x30f020];return _0x3933c0;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=[_0x4444('0x0'),_0x4444('0x1'),_0x4444('0x2')];function createListener(_0x3907b8,_0x567b2d){return function(_0x5e3530){_0x567b2d[_0x4444('0x3')](_0x3907b8,_0x5e3530);};}function removeListener(_0x48082e,_0x2fbd55){return function(){ChatInteractionEvents[_0x4444('0x4')](_0x48082e,_0x2fbd55);};}exports[_0x4444('0x5')]=function(_0x1000ed){for(var _0x2ee1ed=0x0,_0x23a792=events[_0x4444('0x6')];_0x2ee1ed<_0x23a792;_0x2ee1ed++){var _0x21073e=events[_0x2ee1ed];var _0x4222ff=createListener(_0x4444('0x7')+_0x21073e,_0x1000ed);ChatInteractionEvents['on'](_0x21073e,_0x4222ff);}};