787e841708e563a5dd2ea41180afa84b507e088d
[motion2.git] / server / api / openchannelMessage / openchannelMessage.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 _0xaf79=['./openchannelMessage.events','remove','update','register'];(function(_0x532712,_0x3a7dd9){var _0x72136f=function(_0x3c281b){while(--_0x3c281b){_0x532712['push'](_0x532712['shift']());}};_0x72136f(++_0x3a7dd9);}(_0xaf79,0x1f0));var _0x9af7=function(_0x182cec,_0x36dc8d){_0x182cec=_0x182cec-0x0;var _0x4461e1=_0xaf79[_0x182cec];return _0x4461e1;};'use strict';var OpenchannelMessageEvents=require(_0x9af7('0x0'));var events=['save',_0x9af7('0x1'),_0x9af7('0x2')];function createListener(_0x43a20b,_0x103cc3){return function(_0x6f451a){_0x103cc3['emit'](_0x43a20b,_0x6f451a);};}function removeListener(_0x4818e2,_0x526874){return function(){OpenchannelMessageEvents['removeListener'](_0x4818e2,_0x526874);};}exports[_0x9af7('0x3')]=function(_0x4391bf){for(var _0x38eccf=0x0,_0x400d21=events['length'];_0x38eccf<_0x400d21;_0x38eccf++){var _0x2f7c84=events[_0x38eccf];var _0x3b2560=createListener('openchannelMessage:'+_0x2f7c84,_0x4391bf);OpenchannelMessageEvents['on'](_0x2f7c84,_0x3b2560);}};