Built motion from commit 598073ad.|2.5.44
[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 _0x50f1=['save','remove','update','removeListener','whatsappInteraction:'];(function(_0x301064,_0x1985aa){var _0x5bc841=function(_0x57dffc){while(--_0x57dffc){_0x301064['push'](_0x301064['shift']());}};_0x5bc841(++_0x1985aa);}(_0x50f1,0x87));var _0x150f=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x50f1[_0x20a584];return _0x4b41a8;};'use strict';var WhatsappInteractionEvents=require('./whatsappInteraction.events');var events=[_0x150f('0x0'),_0x150f('0x1'),_0x150f('0x2')];function createListener(_0x119860,_0x1d08ce){return function(_0x4cf782){_0x1d08ce['emit'](_0x119860,_0x4cf782);};}function removeListener(_0x515e4d,_0x1ab3da){return function(){WhatsappInteractionEvents[_0x150f('0x3')](_0x515e4d,_0x1ab3da);};}exports['register']=function(_0x5254ea){for(var _0x4450e6=0x0,_0x4b6e5f=events['length'];_0x4450e6<_0x4b6e5f;_0x4450e6++){var _0x5d47ff=events[_0x4450e6];var _0x468f71=createListener(_0x150f('0x4')+_0x5d47ff,_0x5254ea);WhatsappInteractionEvents['on'](_0x5d47ff,_0x468f71);}};