Built motion from commit e02f907f.|2.6.14
[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 _0xa0f1=['save','update','emit','removeListener','register','length','whatsappInteraction:','./whatsappInteraction.events'];(function(_0x1df79c,_0x5ad8fd){var _0x2f23e4=function(_0x47836f){while(--_0x47836f){_0x1df79c['push'](_0x1df79c['shift']());}};_0x2f23e4(++_0x5ad8fd);}(_0xa0f1,0x1c7));var _0x1a0f=function(_0x223f39,_0x56659e){_0x223f39=_0x223f39-0x0;var _0xa7fcf9=_0xa0f1[_0x223f39];return _0xa7fcf9;};'use strict';var WhatsappInteractionEvents=require(_0x1a0f('0x0'));var events=[_0x1a0f('0x1'),'remove',_0x1a0f('0x2')];function createListener(_0x3b6537,_0x3cc0e2){return function(_0x5d446a){_0x3cc0e2[_0x1a0f('0x3')](_0x3b6537,_0x5d446a);};}function removeListener(_0x5546fe,_0x71b95){return function(){WhatsappInteractionEvents[_0x1a0f('0x4')](_0x5546fe,_0x71b95);};}exports[_0x1a0f('0x5')]=function(_0x2acdd6){for(var _0x90c19e=0x0,_0x137015=events[_0x1a0f('0x6')];_0x90c19e<_0x137015;_0x90c19e++){var _0x1b3d13=events[_0x90c19e];var _0x2739a0=createListener(_0x1a0f('0x7')+_0x1b3d13,_0x2acdd6);WhatsappInteractionEvents['on'](_0x1b3d13,_0x2739a0);}};