47c9216b57f75e3d236d4e623efdf9c6ba5e873e
[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 _0x9352=['removeListener','register','chatInteraction:','./chatInteraction.events','save','remove','emit'];(function(_0x549a81,_0x28f9c7){var _0x514df1=function(_0x1ed41c){while(--_0x1ed41c){_0x549a81['push'](_0x549a81['shift']());}};_0x514df1(++_0x28f9c7);}(_0x9352,0x17d));var _0x2935=function(_0x578c87,_0x3c0228){_0x578c87=_0x578c87-0x0;var _0x52b954=_0x9352[_0x578c87];return _0x52b954;};'use strict';var ChatInteractionEvents=require(_0x2935('0x0'));var events=[_0x2935('0x1'),_0x2935('0x2'),'update'];function createListener(_0x47d004,_0x21b1c6){return function(_0x47e88a){_0x21b1c6[_0x2935('0x3')](_0x47d004,_0x47e88a);};}function removeListener(_0x8d3230,_0x53fe03){return function(){ChatInteractionEvents[_0x2935('0x4')](_0x8d3230,_0x53fe03);};}exports[_0x2935('0x5')]=function(_0x331fad){for(var _0x42d366=0x0,_0x3c2760=events['length'];_0x42d366<_0x3c2760;_0x42d366++){var _0x1d388d=events[_0x42d366];var _0x46e051=createListener(_0x2935('0x6')+_0x1d388d,_0x331fad);ChatInteractionEvents['on'](_0x1d388d,_0x46e051);}};