Built motion from commit 85328c08.|2.5.50
[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 _0x8472=['whatsappInteraction:','./whatsappInteraction.events','removeListener','length'];(function(_0x2b04eb,_0x496171){var _0x1ec29b=function(_0x54480f){while(--_0x54480f){_0x2b04eb['push'](_0x2b04eb['shift']());}};_0x1ec29b(++_0x496171);}(_0x8472,0xf5));var _0x2847=function(_0x200fda,_0x4ae957){_0x200fda=_0x200fda-0x0;var _0x56a31c=_0x8472[_0x200fda];return _0x56a31c;};'use strict';var WhatsappInteractionEvents=require(_0x2847('0x0'));var events=['save','remove','update'];function createListener(_0xb34b78,_0x37231c){return function(_0x265857){_0x37231c['emit'](_0xb34b78,_0x265857);};}function removeListener(_0x2820ac,_0x2da171){return function(){WhatsappInteractionEvents[_0x2847('0x1')](_0x2820ac,_0x2da171);};}exports['register']=function(_0x2f4477){for(var _0xef5db1=0x0,_0x1d91bd=events[_0x2847('0x2')];_0xef5db1<_0x1d91bd;_0xef5db1++){var _0x21d21c=events[_0xef5db1];var _0x51c7a9=createListener(_0x2847('0x3')+_0x21d21c,_0x2f4477);WhatsappInteractionEvents['on'](_0x21d21c,_0x51c7a9);}};