0421189478a923cd061552b3dcff69aff070ccc6
[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 _0xfc5a=['emit','whatsappAccount:','./whatsappAccount.events','save','remove'];(function(_0x2dd6b1,_0x4485d7){var _0x494306=function(_0x46d23d){while(--_0x46d23d){_0x2dd6b1['push'](_0x2dd6b1['shift']());}};_0x494306(++_0x4485d7);}(_0xfc5a,0x66));var _0xafc5=function(_0x514e38,_0x18958d){_0x514e38=_0x514e38-0x0;var _0x57305d=_0xfc5a[_0x514e38];return _0x57305d;};'use strict';var WhatsappAccountEvents=require(_0xafc5('0x0'));var events=[_0xafc5('0x1'),_0xafc5('0x2'),'update'];function createListener(_0x436e65,_0x122441){return function(_0x5bd38f){_0x122441[_0xafc5('0x3')](_0x436e65,_0x5bd38f);};}function removeListener(_0x357496,_0x33bbc0){return function(){WhatsappAccountEvents['removeListener'](_0x357496,_0x33bbc0);};}exports['register']=function(_0x423675){for(var _0x424cc6=0x0,_0x2a34f2=events['length'];_0x424cc6<_0x2a34f2;_0x424cc6++){var _0x5766c2=events[_0x424cc6];var _0x4fc3a6=createListener(_0xafc5('0x4')+_0x5766c2,_0x423675);WhatsappAccountEvents['on'](_0x5766c2,_0x4fc3a6);}};