119a286f275ab4d7a79bea16fc7babc1c684c190
[motion2.git] / server / api / chatGroup / chatGroup.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 _0xe339=['register','chatGroup:','save','remove','update'];(function(_0x221071,_0x16f736){var _0x4e9f8e=function(_0xcd378c){while(--_0xcd378c){_0x221071['push'](_0x221071['shift']());}};_0x4e9f8e(++_0x16f736);}(_0xe339,0x188));var _0x9e33=function(_0x42cc58,_0x5a4760){_0x42cc58=_0x42cc58-0x0;var _0x5ca9cb=_0xe339[_0x42cc58];return _0x5ca9cb;};'use strict';var ChatGroupEvents=require('./chatGroup.events');var events=[_0x9e33('0x0'),_0x9e33('0x1'),_0x9e33('0x2')];function createListener(_0x4c5b8a,_0x29c5cf){return function(_0x8590ab){_0x29c5cf['emit'](_0x4c5b8a,_0x8590ab);};}function removeListener(_0x2e4286,_0x4f07f9){return function(){ChatGroupEvents['removeListener'](_0x2e4286,_0x4f07f9);};}exports[_0x9e33('0x3')]=function(_0x58d749){for(var _0x3fb434=0x0,_0x5243f2=events['length'];_0x3fb434<_0x5243f2;_0x3fb434++){var _0x278c7e=events[_0x3fb434];var _0x12eaf4=createListener(_0x9e33('0x4')+_0x278c7e,_0x58d749);ChatGroupEvents['on'](_0x278c7e,_0x12eaf4);}};