Built motion from commit 20b39a97.|2.6.29
[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 _0xbc79=['register','length','whatsappInteraction:','./whatsappInteraction.events','remove','update'];(function(_0x540302,_0x5be2df){var _0x2e92a3=function(_0x2a350e){while(--_0x2a350e){_0x540302['push'](_0x540302['shift']());}};_0x2e92a3(++_0x5be2df);}(_0xbc79,0x1dd));var _0x9bc7=function(_0x59ae54,_0x1ad8ff){_0x59ae54=_0x59ae54-0x0;var _0x45633d=_0xbc79[_0x59ae54];return _0x45633d;};'use strict';var WhatsappInteractionEvents=require(_0x9bc7('0x0'));var events=['save',_0x9bc7('0x1'),_0x9bc7('0x2')];function createListener(_0x465a8a,_0x4b5f84){return function(_0x38c84a){_0x4b5f84['emit'](_0x465a8a,_0x38c84a);};}function removeListener(_0xedda36,_0x2f77c6){return function(){WhatsappInteractionEvents['removeListener'](_0xedda36,_0x2f77c6);};}exports[_0x9bc7('0x3')]=function(_0x47cfc6){for(var _0x53c6b9=0x0,_0x5e8a86=events[_0x9bc7('0x4')];_0x53c6b9<_0x5e8a86;_0x53c6b9++){var _0x35813a=events[_0x53c6b9];var _0x46453b=createListener(_0x9bc7('0x5')+_0x35813a,_0x47cfc6);WhatsappInteractionEvents['on'](_0x35813a,_0x46453b);}};