Built motion from commit e0fa946e.|2.6.5
[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 _0x2f14=['chatInteraction:','save','remove','removeListener','register','length'];(function(_0x213df7,_0x21773e){var _0xde7165=function(_0x41b65a){while(--_0x41b65a){_0x213df7['push'](_0x213df7['shift']());}};_0xde7165(++_0x21773e);}(_0x2f14,0x199));var _0x42f1=function(_0x2e5a16,_0x11ee37){_0x2e5a16=_0x2e5a16-0x0;var _0x5e708d=_0x2f14[_0x2e5a16];return _0x5e708d;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=[_0x42f1('0x0'),_0x42f1('0x1'),'update'];function createListener(_0x39771e,_0x48c650){return function(_0x4272b5){_0x48c650['emit'](_0x39771e,_0x4272b5);};}function removeListener(_0x1596c0,_0x26b5da){return function(){ChatInteractionEvents[_0x42f1('0x2')](_0x1596c0,_0x26b5da);};}exports[_0x42f1('0x3')]=function(_0x210043){for(var _0xd7e996=0x0,_0x230d3b=events[_0x42f1('0x4')];_0xd7e996<_0x230d3b;_0xd7e996++){var _0x28748c=events[_0xd7e996];var _0x516359=createListener(_0x42f1('0x5')+_0x28748c,_0x210043);ChatInteractionEvents['on'](_0x28748c,_0x516359);}};