60a5fb020db6b729bd5124bfde3671249073f638
[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 _0x649c=['chatInteraction:','save','update','emit','removeListener','register','length'];(function(_0x50e807,_0x4ed74a){var _0x4c6395=function(_0x370a26){while(--_0x370a26){_0x50e807['push'](_0x50e807['shift']());}};_0x4c6395(++_0x4ed74a);}(_0x649c,0x1cf));var _0xc649=function(_0x2991aa,_0x3966cb){_0x2991aa=_0x2991aa-0x0;var _0x4aa8b1=_0x649c[_0x2991aa];return _0x4aa8b1;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=[_0xc649('0x0'),'remove',_0xc649('0x1')];function createListener(_0x209658,_0x130426){return function(_0x55b9be){_0x130426[_0xc649('0x2')](_0x209658,_0x55b9be);};}function removeListener(_0x1a9e95,_0x1d1ba5){return function(){ChatInteractionEvents[_0xc649('0x3')](_0x1a9e95,_0x1d1ba5);};}exports[_0xc649('0x4')]=function(_0x46422d){for(var _0xdffe8b=0x0,_0x43e31a=events[_0xc649('0x5')];_0xdffe8b<_0x43e31a;_0xdffe8b++){var _0x3d04b1=events[_0xdffe8b];var _0x5bf82b=createListener(_0xc649('0x6')+_0x3d04b1,_0x46422d);ChatInteractionEvents['on'](_0x3d04b1,_0x5bf82b);}};