06aa54fe2b5e7c46bb03ee1e386f8181bbe7408f
[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 _0x1b0b=['remove','update','register','length','chatInteraction:','save'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1b0b,0x167));var _0xb1b0=function(_0x5f1391,_0x19c132){_0x5f1391=_0x5f1391-0x0;var _0x50ebe3=_0x1b0b[_0x5f1391];return _0x50ebe3;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=[_0xb1b0('0x0'),_0xb1b0('0x1'),_0xb1b0('0x2')];function createListener(_0x5b302c,_0x15d4e2){return function(_0x16b62c){_0x15d4e2['emit'](_0x5b302c,_0x16b62c);};}function removeListener(_0x40093f,_0x57b119){return function(){ChatInteractionEvents['removeListener'](_0x40093f,_0x57b119);};}exports[_0xb1b0('0x3')]=function(_0x8a7cd0){for(var _0x149687=0x0,_0x3ada7b=events[_0xb1b0('0x4')];_0x149687<_0x3ada7b;_0x149687++){var _0x5cac44=events[_0x149687];var _0x564b5a=createListener(_0xb1b0('0x5')+_0x5cac44,_0x8a7cd0);ChatInteractionEvents['on'](_0x5cac44,_0x564b5a);}};