6886db5241ea2da6d627de345f0f93c11e67b93d
[motion2.git] / server / api / chatInteraction / chatInteraction.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 _0x988c=['removeListener','register','length','chatInteraction:','./chatInteraction.events'];(function(_0x2be52f,_0x47530a){var _0x259c4c=function(_0x481b8c){while(--_0x481b8c){_0x2be52f['push'](_0x2be52f['shift']());}};_0x259c4c(++_0x47530a);}(_0x988c,0x19e));var _0xc988=function(_0x5e5f1a,_0x58a38a){_0x5e5f1a=_0x5e5f1a-0x0;var _0x15bee8=_0x988c[_0x5e5f1a];return _0x15bee8;};'use strict';var ChatInteractionEvents=require(_0xc988('0x0'));var events=['save','remove','update'];function createListener(_0x411396,_0x2b35fe){return function(_0x169896){_0x2b35fe['emit'](_0x411396,_0x169896);};}function removeListener(_0x5e41fb,_0x54397d){return function(){ChatInteractionEvents[_0xc988('0x1')](_0x5e41fb,_0x54397d);};}exports[_0xc988('0x2')]=function(_0x17fa32){for(var _0x56317c=0x0,_0x26e109=events[_0xc988('0x3')];_0x56317c<_0x26e109;_0x56317c++){var _0x4e6f38=events[_0x56317c];var _0x4e48db=createListener(_0xc988('0x4')+_0x4e6f38,_0x17fa32);ChatInteractionEvents['on'](_0x4e6f38,_0x4e48db);}};