Built motion from commit 3e059bc2.|2.5.32
[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 _0xeaf5=['remove','update','emit','length','whatsappAccount:'];(function(_0x18e3a1,_0xd51faa){var _0x69b4a1=function(_0x2509a8){while(--_0x2509a8){_0x18e3a1['push'](_0x18e3a1['shift']());}};_0x69b4a1(++_0xd51faa);}(_0xeaf5,0x109));var _0x5eaf=function(_0xf13ca6,_0x5735ea){_0xf13ca6=_0xf13ca6-0x0;var _0x4a4387=_0xeaf5[_0xf13ca6];return _0x4a4387;};'use strict';var WhatsappAccountEvents=require('./whatsappAccount.events');var events=['save',_0x5eaf('0x0'),_0x5eaf('0x1')];function createListener(_0x119111,_0x1d6c52){return function(_0x53b3d4){_0x1d6c52[_0x5eaf('0x2')](_0x119111,_0x53b3d4);};}function removeListener(_0x2119ee,_0x3ca7c3){return function(){WhatsappAccountEvents['removeListener'](_0x2119ee,_0x3ca7c3);};}exports['register']=function(_0x1eb88c){for(var _0x1d34dd=0x0,_0x432dcf=events[_0x5eaf('0x3')];_0x1d34dd<_0x432dcf;_0x1d34dd++){var _0x403b31=events[_0x1d34dd];var _0x2d7b48=createListener(_0x5eaf('0x4')+_0x403b31,_0x1eb88c);WhatsappAccountEvents['on'](_0x403b31,_0x2d7b48);}};