Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / whatsappAccount / whatsappAccount.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 _0x270d=['length','./whatsappAccount.events','save','remove','removeListener','register'];(function(_0x45f9fd,_0x2d5b17){var _0x14d2a5=function(_0x2de53e){while(--_0x2de53e){_0x45f9fd['push'](_0x45f9fd['shift']());}};_0x14d2a5(++_0x2d5b17);}(_0x270d,0x193));var _0xd270=function(_0x29ab52,_0x438164){_0x29ab52=_0x29ab52-0x0;var _0x5f2bbf=_0x270d[_0x29ab52];return _0x5f2bbf;};'use strict';var WhatsappAccountEvents=require(_0xd270('0x0'));var events=[_0xd270('0x1'),_0xd270('0x2'),'update'];function createListener(_0x4d8bce,_0x571333){return function(_0x413269){_0x571333['emit'](_0x4d8bce,_0x413269);};}function removeListener(_0x2af20c,_0x13924f){return function(){WhatsappAccountEvents[_0xd270('0x3')](_0x2af20c,_0x13924f);};}exports[_0xd270('0x4')]=function(_0x114d78){for(var _0x5558c0=0x0,_0x12abfa=events[_0xd270('0x5')];_0x5558c0<_0x12abfa;_0x5558c0++){var _0x2e8dcd=events[_0x5558c0];var _0x24c9dc=createListener('whatsappAccount:'+_0x2e8dcd,_0x114d78);WhatsappAccountEvents['on'](_0x2e8dcd,_0x24c9dc);}};