Built motion from commit 25580385.|2.6.2
[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 _0x3718=['removeListener','length','remove','update'];(function(_0x1577f2,_0x6a4be8){var _0x4fc76e=function(_0x210e29){while(--_0x210e29){_0x1577f2['push'](_0x1577f2['shift']());}};_0x4fc76e(++_0x6a4be8);}(_0x3718,0x16e));var _0x8371=function(_0x2ce43d,_0x291f46){_0x2ce43d=_0x2ce43d-0x0;var _0x3acd28=_0x3718[_0x2ce43d];return _0x3acd28;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=['save',_0x8371('0x0'),_0x8371('0x1')];function createListener(_0x1e57b3,_0x223de3){return function(_0x3eaece){_0x223de3['emit'](_0x1e57b3,_0x3eaece);};}function removeListener(_0x46a9d2,_0x2d2747){return function(){ChatInteractionEvents[_0x8371('0x2')](_0x46a9d2,_0x2d2747);};}exports['register']=function(_0x1bff7e){for(var _0x187872=0x0,_0x34f45a=events[_0x8371('0x3')];_0x187872<_0x34f45a;_0x187872++){var _0x469f7e=events[_0x187872];var _0x2f409a=createListener('chatInteraction:'+_0x469f7e,_0x1bff7e);ChatInteractionEvents['on'](_0x469f7e,_0x2f409a);}};