1d1386314b1009a6ab646ab8d86ecaa110c12f1f
[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 _0xfcbe=['openchannelMessage:','save','remove','update'];(function(_0x3c3ca2,_0x371821){var _0xa47f55=function(_0x1e7e3f){while(--_0x1e7e3f){_0x3c3ca2['push'](_0x3c3ca2['shift']());}};_0xa47f55(++_0x371821);}(_0xfcbe,0x1b1));var _0xefcb=function(_0x5cfe30,_0xdd65bf){_0x5cfe30=_0x5cfe30-0x0;var _0x355042=_0xfcbe[_0x5cfe30];return _0x355042;};'use strict';var OpenchannelMessageEvents=require('./openchannelMessage.events');var events=[_0xefcb('0x0'),_0xefcb('0x1'),_0xefcb('0x2')];function createListener(_0x1d029d,_0x752292){return function(_0x11e156){_0x752292['emit'](_0x1d029d,_0x11e156);};}function removeListener(_0xbfb8c6,_0x14f3b5){return function(){OpenchannelMessageEvents['removeListener'](_0xbfb8c6,_0x14f3b5);};}exports['register']=function(_0x50dcde){for(var _0x3f322c=0x0,_0x4e15ab=events['length'];_0x3f322c<_0x4e15ab;_0x3f322c++){var _0x4697fe=events[_0x3f322c];var _0x55cad2=createListener(_0xefcb('0x3')+_0x4697fe,_0x50dcde);OpenchannelMessageEvents['on'](_0x4697fe,_0x55cad2);}};