8c824e957c521f49ca855465ef57b5eeacf48526
[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 _0x09bf=['removeListener','register','length','chatInteraction:','./chatInteraction.events','remove','update'];(function(_0x5b013d,_0xc7691c){var _0x2b6eef=function(_0x3143ca){while(--_0x3143ca){_0x5b013d['push'](_0x5b013d['shift']());}};_0x2b6eef(++_0xc7691c);}(_0x09bf,0xa5));var _0xf09b=function(_0x5e3536,_0xace10d){_0x5e3536=_0x5e3536-0x0;var _0x3eb375=_0x09bf[_0x5e3536];return _0x3eb375;};'use strict';var ChatInteractionEvents=require(_0xf09b('0x0'));var events=['save',_0xf09b('0x1'),_0xf09b('0x2')];function createListener(_0x2c20e0,_0x5e2268){return function(_0x51e3b2){_0x5e2268['emit'](_0x2c20e0,_0x51e3b2);};}function removeListener(_0x457683,_0x2e575e){return function(){ChatInteractionEvents[_0xf09b('0x3')](_0x457683,_0x2e575e);};}exports[_0xf09b('0x4')]=function(_0xc2e1df){for(var _0xdcbbcb=0x0,_0xfe69b=events[_0xf09b('0x5')];_0xdcbbcb<_0xfe69b;_0xdcbbcb++){var _0x5b83b4=events[_0xdcbbcb];var _0x52828a=createListener(_0xf09b('0x6')+_0x5b83b4,_0xc2e1df);ChatInteractionEvents['on'](_0x5b83b4,_0x52828a);}};