60b8b3917be1f49c070100c6c84213a7c7e70f85
[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 _0x66ed=['save','remove','removeListener','register','length','chatInteraction:','./chatInteraction.events'];(function(_0x19569f,_0x1df499){var _0x454671=function(_0x4774a4){while(--_0x4774a4){_0x19569f['push'](_0x19569f['shift']());}};_0x454671(++_0x1df499);}(_0x66ed,0x14f));var _0xd66e=function(_0x268176,_0x508f2b){_0x268176=_0x268176-0x0;var _0x46d828=_0x66ed[_0x268176];return _0x46d828;};'use strict';var ChatInteractionEvents=require(_0xd66e('0x0'));var events=[_0xd66e('0x1'),_0xd66e('0x2'),'update'];function createListener(_0x3cf60b,_0x1de95f){return function(_0x49dd23){_0x1de95f['emit'](_0x3cf60b,_0x49dd23);};}function removeListener(_0x1e07d7,_0x2b9afb){return function(){ChatInteractionEvents[_0xd66e('0x3')](_0x1e07d7,_0x2b9afb);};}exports[_0xd66e('0x4')]=function(_0x5c4238){for(var _0x277adf=0x0,_0x35dd94=events[_0xd66e('0x5')];_0x277adf<_0x35dd94;_0x277adf++){var _0x30e2df=events[_0x277adf];var _0x7d0163=createListener(_0xd66e('0x6')+_0x30e2df,_0x5c4238);ChatInteractionEvents['on'](_0x30e2df,_0x7d0163);}};