0124ca06a3caf336d57e44be73f8ac5b961507cc
[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 _0x1156=['update','removeListener','register','./whatsappAccount.events','save','remove'];(function(_0x512f81,_0x4a7986){var _0xa15099=function(_0x1f7371){while(--_0x1f7371){_0x512f81['push'](_0x512f81['shift']());}};_0xa15099(++_0x4a7986);}(_0x1156,0x75));var _0x6115=function(_0x22f8ab,_0x15d8ff){_0x22f8ab=_0x22f8ab-0x0;var _0x2a70e5=_0x1156[_0x22f8ab];return _0x2a70e5;};'use strict';var WhatsappAccountEvents=require(_0x6115('0x0'));var events=[_0x6115('0x1'),_0x6115('0x2'),_0x6115('0x3')];function createListener(_0x230bf7,_0x53cf9c){return function(_0x42a1ab){_0x53cf9c['emit'](_0x230bf7,_0x42a1ab);};}function removeListener(_0x4503cb,_0x1c43de){return function(){WhatsappAccountEvents[_0x6115('0x4')](_0x4503cb,_0x1c43de);};}exports[_0x6115('0x5')]=function(_0x3368de){for(var _0x44c5d9=0x0,_0x2f3f78=events['length'];_0x44c5d9<_0x2f3f78;_0x44c5d9++){var _0x4309d6=events[_0x44c5d9];var _0x4371b7=createListener('whatsappAccount:'+_0x4309d6,_0x3368de);WhatsappAccountEvents['on'](_0x4309d6,_0x4371b7);}};