Built motion from commit (unavailable).|2.5.22
[motion2.git] / server / api / whatsappInteraction / whatsappInteraction.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 _0xc374=['whatsappInteraction:','./whatsappInteraction.events','save','update','emit','removeListener','register','length'];(function(_0x30680a,_0x4b6e66){var _0x3c689e=function(_0x2c10b2){while(--_0x2c10b2){_0x30680a['push'](_0x30680a['shift']());}};_0x3c689e(++_0x4b6e66);}(_0xc374,0x119));var _0x4c37=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xc374[_0x321bb2];return _0x9c12ed;};'use strict';var WhatsappInteractionEvents=require(_0x4c37('0x0'));var events=[_0x4c37('0x1'),'remove',_0x4c37('0x2')];function createListener(_0x190ef1,_0x3ab32d){return function(_0x1e5e3c){_0x3ab32d[_0x4c37('0x3')](_0x190ef1,_0x1e5e3c);};}function removeListener(_0x4f71a5,_0x56df6f){return function(){WhatsappInteractionEvents[_0x4c37('0x4')](_0x4f71a5,_0x56df6f);};}exports[_0x4c37('0x5')]=function(_0x3aada8){for(var _0x3ff70c=0x0,_0x49341f=events[_0x4c37('0x6')];_0x3ff70c<_0x49341f;_0x3ff70c++){var _0x444112=events[_0x3ff70c];var _0x4b9f38=createListener(_0x4c37('0x7')+_0x444112,_0x3aada8);WhatsappInteractionEvents['on'](_0x444112,_0x4b9f38);}};