445c25bd2e6152e075285ce93544e320a86afc25
[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 _0x9a62=['save','register','./chatGroup.events'];(function(_0x34bd34,_0x1444f7){var _0x4e36d6=function(_0x20ed8e){while(--_0x20ed8e){_0x34bd34['push'](_0x34bd34['shift']());}};_0x4e36d6(++_0x1444f7);}(_0x9a62,0x122));var _0x29a6=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x9a62[_0x59ee6f];return _0x4c0979;};'use strict';var ChatGroupEvents=require(_0x29a6('0x0'));var events=[_0x29a6('0x1'),'remove','update'];function createListener(_0x415866,_0x37c417){return function(_0x4efcc3){_0x37c417['emit'](_0x415866,_0x4efcc3);};}function removeListener(_0x5b57bc,_0x87711d){return function(){ChatGroupEvents['removeListener'](_0x5b57bc,_0x87711d);};}exports[_0x29a6('0x2')]=function(_0x1784d7){for(var _0x29ad5b=0x0,_0x5beaae=events['length'];_0x29ad5b<_0x5beaae;_0x29ad5b++){var _0x4476bd=events[_0x29ad5b];var _0x10193c=createListener('chatGroup:'+_0x4476bd,_0x1784d7);ChatGroupEvents['on'](_0x4476bd,_0x10193c);}};