de41c31a49add3209316a78a069c71f30a36bf08
[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 _0xfe59=['length','update','emit','register'];(function(_0x2ce6a6,_0x58e423){var _0x52611d=function(_0x30fa43){while(--_0x30fa43){_0x2ce6a6['push'](_0x2ce6a6['shift']());}};_0x52611d(++_0x58e423);}(_0xfe59,0xdd));var _0x9fe5=function(_0x4ad58c,_0x200d00){_0x4ad58c=_0x4ad58c-0x0;var _0x421f8a=_0xfe59[_0x4ad58c];return _0x421f8a;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=['save','remove',_0x9fe5('0x0')];function createListener(_0x1ddee1,_0x4847f7){return function(_0x1bd870){_0x4847f7[_0x9fe5('0x1')](_0x1ddee1,_0x1bd870);};}function removeListener(_0x4c61fc,_0x8e0491){return function(){ChatInteractionEvents['removeListener'](_0x4c61fc,_0x8e0491);};}exports[_0x9fe5('0x2')]=function(_0x4c1184){for(var _0x17d397=0x0,_0x2cb74d=events[_0x9fe5('0x3')];_0x17d397<_0x2cb74d;_0x17d397++){var _0x489ae2=events[_0x17d397];var _0x59b628=createListener('chatInteraction:'+_0x489ae2,_0x4c1184);ChatInteractionEvents['on'](_0x489ae2,_0x59b628);}};