85c059f0087c92dd77a6ee2f108c4f7a3bcfbafe
[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 _0x8471=['update','emit','removeListener','register','length','chatInteraction:','./chatInteraction.events','save','remove'];(function(_0x36fe9b,_0x518d1b){var _0x113065=function(_0x4f78d4){while(--_0x4f78d4){_0x36fe9b['push'](_0x36fe9b['shift']());}};_0x113065(++_0x518d1b);}(_0x8471,0xe7));var _0x1847=function(_0x3a81a5,_0x1c92ef){_0x3a81a5=_0x3a81a5-0x0;var _0x37e7a9=_0x8471[_0x3a81a5];return _0x37e7a9;};'use strict';var ChatInteractionEvents=require(_0x1847('0x0'));var events=[_0x1847('0x1'),_0x1847('0x2'),_0x1847('0x3')];function createListener(_0x1dd83c,_0x468789){return function(_0x4ea324){_0x468789[_0x1847('0x4')](_0x1dd83c,_0x4ea324);};}function removeListener(_0x4fe8b7,_0x99e8a3){return function(){ChatInteractionEvents[_0x1847('0x5')](_0x4fe8b7,_0x99e8a3);};}exports[_0x1847('0x6')]=function(_0x187a7f){for(var _0x34093b=0x0,_0xea2573=events[_0x1847('0x7')];_0x34093b<_0xea2573;_0x34093b++){var _0x98af1d=events[_0x34093b];var _0xff47e0=createListener(_0x1847('0x8')+_0x98af1d,_0x187a7f);ChatInteractionEvents['on'](_0x98af1d,_0xff47e0);}};