Built motion from commit (unavailable).|2.5.4
[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 _0x3a3f=['removeListener','register','length','whatsappInteraction:','./whatsappInteraction.events','remove'];(function(_0x4c913d,_0x4a751a){var _0xb4413e=function(_0x242e86){while(--_0x242e86){_0x4c913d['push'](_0x4c913d['shift']());}};_0xb4413e(++_0x4a751a);}(_0x3a3f,0xfa));var _0xf3a3=function(_0x436ec9,_0x12e923){_0x436ec9=_0x436ec9-0x0;var _0x37d585=_0x3a3f[_0x436ec9];return _0x37d585;};'use strict';var WhatsappInteractionEvents=require(_0xf3a3('0x0'));var events=['save',_0xf3a3('0x1'),'update'];function createListener(_0x449124,_0x3cdef9){return function(_0x28a1d5){_0x3cdef9['emit'](_0x449124,_0x28a1d5);};}function removeListener(_0x43621a,_0x10001f){return function(){WhatsappInteractionEvents[_0xf3a3('0x2')](_0x43621a,_0x10001f);};}exports[_0xf3a3('0x3')]=function(_0x5ed77a){for(var _0x49bd2f=0x0,_0x822a50=events[_0xf3a3('0x4')];_0x49bd2f<_0x822a50;_0x49bd2f++){var _0x50b0c1=events[_0x49bd2f];var _0x21a068=createListener(_0xf3a3('0x5')+_0x50b0c1,_0x5ed77a);WhatsappInteractionEvents['on'](_0x50b0c1,_0x21a068);}};