fd5e1d3da14a82fe9fa0ff185d42cffe9298d781
[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 _0x8d58=['length','chatInteraction:','./chatInteraction.events','update','register'];(function(_0x12fd56,_0x74350b){var _0x22e804=function(_0x53668e){while(--_0x53668e){_0x12fd56['push'](_0x12fd56['shift']());}};_0x22e804(++_0x74350b);}(_0x8d58,0xde));var _0x88d5=function(_0x204106,_0x3e2e12){_0x204106=_0x204106-0x0;var _0x157a1a=_0x8d58[_0x204106];return _0x157a1a;};'use strict';var ChatInteractionEvents=require(_0x88d5('0x0'));var events=['save','remove',_0x88d5('0x1')];function createListener(_0x2eff79,_0x130cfd){return function(_0x38ed0){_0x130cfd['emit'](_0x2eff79,_0x38ed0);};}function removeListener(_0x40a332,_0x30da4d){return function(){ChatInteractionEvents['removeListener'](_0x40a332,_0x30da4d);};}exports[_0x88d5('0x2')]=function(_0x3dad55){for(var _0x4459f5=0x0,_0x496297=events[_0x88d5('0x3')];_0x4459f5<_0x496297;_0x4459f5++){var _0x5c0fb6=events[_0x4459f5];var _0x4b6c7c=createListener(_0x88d5('0x4')+_0x5c0fb6,_0x3dad55);ChatInteractionEvents['on'](_0x5c0fb6,_0x4b6c7c);}};